Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
30 | public function __construct(string $secretKey, string $publicKey) |
||
31 | { |
||
32 | try { |
||
33 | $this->keypair = \sodium_crypto_box_keypair_from_secretkey_and_publickey( |
||
34 | $secretKey, |
||
35 | $publicKey |
||
36 | ); |
||
37 | } catch (SodiumException $e) { |
||
38 | throw new InvalidArgumentException($e->getMessage()); |
||
39 | } |
||
84 | } |