Lines Matching refs:hash_init
2 Hash: hash_init() function - errors test
5 echo "*** Testing hash_init(): error conditions ***\n";
7 echo "\n-- Testing hash_init() function with unknown algorithms --\n";
9 var_dump(hash_init('dummy'));
15 echo "\n-- Testing hash_init() function with HASH_HMAC and non-cryptographic algorithms --\n";
17 var_dump(hash_init('crc32', HASH_HMAC));
23 echo "\n-- Testing hash_init() function with HASH_HMAC and no key --\n";
25 var_dump(hash_init('md5', HASH_HMAC));
32 var_dump(hash_init('md5', HASH_HMAC, null));
41 *** Testing hash_init(): error conditions ***
43 -- Testing hash_init() function with unknown algorithms --
44 hash_init(): Argument #1 ($algo) must be a valid hashing algorithm
46 -- Testing hash_init() function with HASH_HMAC and non-cryptographic algorithms --
47 hash_init(): Argument #1 ($algo) must be a cryptographic hashing algorithm if HMAC is requested
49 -- Testing hash_init() function with HASH_HMAC and no key --
50 hash_init(): Argument #3 ($key) cannot be empty when HMAC is requested
51 hash_init(): Argument #3 ($key) cannot be empty when HMAC is requested