| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | 19 | public function encode(NodeInterface $node): ?string |
|
| 51 | { |
||
| 52 | 19 | $nodeString = parent::encode($node); |
|
| 53 | 19 | $ciphertext = openssl_encrypt( |
|
| 54 | 19 | $nodeString, |
|
| 55 | 19 | $this->cipher, |
|
| 56 | 19 | $this->secret, |
|
| 57 | 19 | OPENSSL_ZERO_PADDING, |
|
| 58 | 19 | $this->nonce |
|
| 59 | ); |
||
| 60 | |||
| 61 | 19 | return $ciphertext; |
|
| 62 | } |
||
| 80 |