Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
29 | public function __construct(string $secretKey, string $publicKey) |
||
30 | { |
||
31 | if (\strlen($secretKey) % 16 !== 0) { |
||
32 | throw new InvalidArgumentException(sprintf("Secret key should be a multiple of %d bytes.", 16)); |
||
33 | } |
||
34 | |||
35 | $this->secretKey = $secretKey; |
||
36 | |||
37 | if (\strlen($publicKey) % 4 !== 0) { |
||
38 | throw new InvalidArgumentException(sprintf("Public key should be a multiple of %d bytes.", 4)); |
||
39 | } |
||
40 | |||
41 | $this->publicKey = $publicKey; |
||
42 | } |
||
77 |