1 | <?php |
||
8 | final class EncryptionKey extends ActiveRecord |
||
9 | { |
||
10 | /** |
||
11 | * Model attributes |
||
12 | * @return array |
||
13 | */ |
||
14 | public function attributes() |
||
22 | |||
23 | /** |
||
24 | * @return \Sodium\crypto_box_publickey |
||
25 | */ |
||
26 | public function getBoxPublicKey() |
||
30 | |||
31 | /** |
||
32 | * @return \Sodium\crypto_box_keypair |
||
33 | */ |
||
34 | public function getBoxKeyPair() |
||
40 | |||
41 | /** |
||
42 | * Helper method to return an encryption key |
||
43 | * @return EncryptionKey |
||
44 | */ |
||
45 | public function generate() |
||
58 | } |