| Total Complexity | 2 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class SignedMessage extends CryptoBox{ |
||
| 16 | |||
| 17 | public function create(string $message):CryptoBoxInterface{ |
||
| 18 | $this->checkKeypair(SODIUM_CRYPTO_SIGN_SECRETKEYBYTES); |
||
| 19 | |||
| 20 | $this->box = sodium_crypto_sign($this->checkMessage($message), $this->keypair->secret); |
||
|
|
|||
| 21 | |||
| 22 | sodium_memzero($message); |
||
| 23 | |||
| 24 | return $this; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function open(string $box_bin):CryptoBoxInterface{ |
||
| 35 | } |
||
| 36 | |||
| 38 |