Total Complexity | 11 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class CryptographyService implements CryptographyInterface |
||
11 | { |
||
12 | 11 | public function __construct( |
|
15 | 11 | } |
|
16 | |||
17 | 8 | public function isEncrypted(string $payload): bool |
|
18 | { |
||
19 | 8 | return str_starts_with($payload, '<ENC>') && str_ends_with($payload, '</ENC>'); |
|
20 | } |
||
21 | |||
22 | 9 | public function encrypt(string $payload): string |
|
31 | } |
||
32 | |||
33 | 6 | public function decrypt(string $payload): string |
|
43 | } |
||
44 | } |
||
46 |