Lines Matching refs:hash_hkdf

2 Test hash_hkdf() function: error conditions
15 echo "*** Testing hash_hkdf(): error conditions ***\n";
17 echo "\n-- Testing hash_hkdf() function with less than expected no. of arguments --\n";
18 var_dump(hash_hkdf());
19 var_dump(hash_hkdf('sha1'));
21 echo "\n-- Testing hash_hkdf() function with more than expected no. of arguments --\n";
22 var_dump(hash_hkdf('sha1', $ikm, 20, '', '', 'extra parameter'));
24 echo "\n-- Testing hash_hkdf() function with invalid hash algorithm --\n";
25 var_dump(hash_hkdf('foo', $ikm));
27 echo "\n-- Testing hash_hkdf() function with non-cryptographic hash algorithm --\n";
28 var_dump(hash_hkdf('adler32', $ikm));
29 var_dump(hash_hkdf('crc32', $ikm));
30 var_dump(hash_hkdf('crc32b', $ikm));
31 var_dump(hash_hkdf('fnv132', $ikm));
32 var_dump(hash_hkdf('fnv1a32', $ikm));
33 var_dump(hash_hkdf('fnv164', $ikm));
34 var_dump(hash_hkdf('fnv1a64', $ikm));
35 var_dump(hash_hkdf('joaat', $ikm));
37 echo "\n-- Testing hash_hkdf() function with invalid parameters --\n";
38 var_dump(hash_hkdf('sha1', ''));
39 var_dump(hash_hkdf('sha1', $ikm, -1));
40 var_dump(hash_hkdf('sha1', $ikm, 20 * 255 + 1)); // Length can't be more than 255 times the hash di…
44 *** Testing hash_hkdf(): error conditions ***
46 -- Testing hash_hkdf() function with less than expected no. of arguments --
48 Warning: hash_hkdf() expects at least 2 parameters, 0 given in %s on line %d
51 Warning: hash_hkdf() expects at least 2 parameters, 1 given in %s on line %d
54 -- Testing hash_hkdf() function with more than expected no. of arguments --
56 Warning: hash_hkdf() expects at most 5 parameters, 6 given in %s on line %d
59 -- Testing hash_hkdf() function with invalid hash algorithm --
61 Warning: hash_hkdf(): Unknown hashing algorithm: foo in %s on line %d
64 -- Testing hash_hkdf() function with non-cryptographic hash algorithm --
66 Warning: hash_hkdf(): Non-cryptographic hashing algorithm: adler32 in %s on line %d
69 Warning: hash_hkdf(): Non-cryptographic hashing algorithm: crc32 in %s on line %d
72 Warning: hash_hkdf(): Non-cryptographic hashing algorithm: crc32b in %s on line %d
75 Warning: hash_hkdf(): Non-cryptographic hashing algorithm: fnv132 in %s on line %d
78 Warning: hash_hkdf(): Non-cryptographic hashing algorithm: fnv1a32 in %s on line %d
81 Warning: hash_hkdf(): Non-cryptographic hashing algorithm: fnv164 in %s on line %d
84 Warning: hash_hkdf(): Non-cryptographic hashing algorithm: fnv1a64 in %s on line %d
87 Warning: hash_hkdf(): Non-cryptographic hashing algorithm: joaat in %s on line %d
90 -- Testing hash_hkdf() function with invalid parameters --
92 Warning: hash_hkdf(): Input keying material cannot be empty in %s on line %d
95 Warning: hash_hkdf(): Length must be greater than or equal to 0: -1 in %s on line %d
98 Warning: hash_hkdf(): Length must be less than or equal to 5100: 5101 in %s on line %d