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