1 | <?php declare(strict_types=1); |
||
27 | class OneTimePad |
||
28 | { |
||
29 | /** |
||
30 | * Encrypt or decrypt a binary input string. |
||
31 | * |
||
32 | * @param string $input Input data to encrypt |
||
33 | * @param string $key Encryption/decryption key to use on input |
||
34 | * @param string $algo Hashing algo to generate keystream |
||
35 | * @return string |
||
36 | */ |
||
37 | 2 | public static function crypt(string $input, string $key, string $algo = 'sha3-512'): string |
|
52 | } |
||
53 |