| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | class SignedMessage extends CryptoBoxAbstract{ |
||
| 20 | |||
| 21 | /** @inheritdoc */ |
||
| 22 | public function create(string $message):CryptoBoxInterface{ |
||
| 23 | $this->checkKeypair(SODIUM_CRYPTO_SIGN_SECRETKEYBYTES); |
||
| 24 | |||
| 25 | $this->box = sodium_crypto_sign($this->checkMessage($message), $this->keypair->secret); |
||
| 26 | |||
| 27 | sodium_memzero($message); |
||
| 28 | |||
| 29 | return $this; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @inheritdoc |
||
| 34 | * |
||
| 35 | * @throws \chillerlan\Cryptobox\CryptoException |
||
| 36 | */ |
||
| 37 | public function open(string $box_bin):CryptoBoxInterface{ |
||
| 49 | } |
||
| 50 | |||
| 52 |