Total Complexity | 3 |
Total Lines | 9 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | $crypt = new class implements \Promopult\Integra\CryptInterface { |
||
11 | public function encode(string $s, string $ck): string { |
||
12 | $r = ''; |
||
13 | for ($i = 0; $i < strlen($s); $i++) { |
||
14 | $r .= chr(ord(substr($s, $i, 1)) + ord(substr($ck, ($i % strlen($ck)) - 1, 1))); |
||
15 | } |
||
16 | return base64_encode($r); |
||
17 | } |
||
18 | public function decode(string $string, string $key): string { return ''; } |
||
19 | }; |
||
20 |