Total Complexity | 1 |
Total Lines | 11 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | final class HashCalculator |
||
10 | { |
||
11 | /** |
||
12 | * @param string $data The string to be signed |
||
13 | * @param string $key The secret with which to sign it |
||
14 | * |
||
15 | * @return string A base64-encoded SHA256 hash (so it is guaranteed to be 44 bytes long) |
||
16 | */ |
||
17 | 93 | public static function hmac(string $data, string $key): string |
|
22 |