(string $path, string $key)
| 42 | } |
| 43 | |
| 44 | function readEncryptedJson(string $path, string $key): array |
| 45 | { |
| 46 | if (!file_exists($path)) { |
| 47 | return []; |
| 48 | } |
| 49 | $raw = file_get_contents($path); |
| 50 | $dec = decryptForTest($raw, $key); |
| 51 | $data = json_decode($dec, true); |
| 52 | return is_array($data) ? $data : []; |
| 53 | } |
| 54 | |
| 55 | function rememberTokenHash(string $token, string $key): string |
| 56 | { |
no test coverage detected