Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function encrypt(string $plaintext, string $key): string |
||
15 | { |
||
16 | try { |
||
17 | return Crypto::encryptWithPassword($plaintext, $key); |
||
18 | } catch (CryptoException $exception) { |
||
19 | throw new EncryptionAdapterException( |
||
20 | 'Failed to encrypt string with provided key', |
||
21 | 0, |
||
22 | $exception |
||
23 | ); |
||
40 |