Lines Matching refs:hash_init
2 hash_init() function - errors test
9 echo "*** Testing hash_init(): error conditions ***\n";
11 echo "-- Testing hash_init() function with no parameters --\n";
12 var_dump(hash_init());
14 echo "-- Testing hash_init() function with unknown algorithms --\n";
15 var_dump(hash_init('dummy'));
17 echo "-- Testing hash_init() function with HASH_HMAC and non-cryptographic algorithms --\n";
18 var_dump(hash_init('crc32', HASH_HMAC));
20 echo "-- Testing hash_init() function with HASH_HMAC and no key --\n";
21 var_dump(hash_init('md5', HASH_HMAC));
22 var_dump(hash_init('md5', HASH_HMAC, null));
25 *** Testing hash_init(): error conditions ***
26 -- Testing hash_init() function with no parameters --
28 Warning: hash_init() expects at least 1 parameter, 0 given in %s on line %d
30 -- Testing hash_init() function with unknown algorithms --
32 Warning: hash_init(): Unknown hashing algorithm: dummy in %s on line %d
34 -- Testing hash_init() function with HASH_HMAC and non-cryptographic algorithms --
36 Warning: hash_init(): HMAC requested with a non-cryptographic hashing algorithm: crc32 in %s on lin…
38 -- Testing hash_init() function with HASH_HMAC and no key --
40 Warning: hash_init(): HMAC requested without a key %s on line %d
43 Warning: hash_init(): HMAC requested without a key %s on line %d