Lines Matching refs:hash_hkdf

2 Hash: hash_hkdf() function: error conditions
21 echo "*** Testing hash_hkdf(): error conditions ***\n";
23 echo "\n-- Testing hash_hkdf() function with invalid hash algorithm --\n";
25 fn() => hash_hkdf('foo', $ikm)
28 echo "\n-- Testing hash_hkdf() function with non-cryptographic hash algorithm --\n";
30 fn() => hash_hkdf('adler32', $ikm),
31 fn() => hash_hkdf('crc32', $ikm),
32 fn() => hash_hkdf('crc32b', $ikm),
33 fn() => hash_hkdf('fnv132', $ikm),
34 fn() => hash_hkdf('fnv1a32', $ikm),
35 fn() => hash_hkdf('fnv164', $ikm),
36 fn() => hash_hkdf('fnv1a64', $ikm),
37 fn() => hash_hkdf('joaat', $ikm)
40 echo "\n-- Testing hash_hkdf() function with invalid parameters --\n";
42 fn() => hash_hkdf('sha1', ''),
43 fn() => hash_hkdf('sha1', $ikm, -1),
44 …fn() => hash_hkdf('sha1', $ikm, 20 * 255 + 1) // Length can't be more than 255 times the hash dige…
48 *** Testing hash_hkdf(): error conditions ***
50 -- Testing hash_hkdf() function with invalid hash algorithm --
51 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
53 -- Testing hash_hkdf() function with non-cryptographic hash algorithm --
54 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
55 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
56 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
57 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
58 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
59 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
60 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
61 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
63 -- Testing hash_hkdf() function with invalid parameters --
64 [ValueError] hash_hkdf(): Argument #2 ($key) cannot be empty
65 [ValueError] hash_hkdf(): Argument #3 ($length) must be greater than or equal to 0
66 [ValueError] hash_hkdf(): Argument #3 ($length) must be less than or equal to 5100