Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function get($params) |
||
|
|||
17 | { |
||
18 | // Generate a one time key pair |
||
19 | $model = TokenKeyPair::generate(TokenKeyPair::OTK_TYPE); |
||
20 | |||
21 | // Return the public keys, and a signature of the public key |
||
22 | return [ |
||
23 | 'public' => \base64_encode($model->getBoxPublicKey()), |
||
24 | 'signing' => \base64_encode($model->getSignPublicKey()), |
||
25 | 'signature' => \base64_encode(\Sodium\crypto_sign( |
||
26 | $model->getBoxPublicKey(), |
||
27 | \base64_decode($model->secret_sign_kp) |
||
28 | )), |
||
29 | 'hash' => $model->hash, |
||
30 | 'expires_at' => $model->expires_at |
||
31 | ]; |
||
32 | } |
||
33 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.