Lines Matching refs:hash_hmac
2 Test hash_hmac() function : basic functionality
8 * proto string hash_hmac ( string algo, string data, string key [, bool raw_output] )
12 echo "*** Testing hash_hmac() : error conditions ***\n";
14 $data = "This is a sample string used to test the hash_hmac function with various hashing algorithm…
17 echo "\n-- Testing hash_hmac() function with less than expected no. of arguments --\n";
18 var_dump(hash_hmac());
19 var_dump(hash_hmac('crc32'));
20 var_dump(hash_hmac('crc32', $data));
22 echo "\n-- Testing hash_hmac() function with more than expected no. of arguments --\n";
24 var_dump(hash_hmac('crc32', $data, $key, TRUE, $extra_arg));
26 echo "\n-- Testing hash_hmac() function with invalid hash algorithm --\n";
27 var_dump(hash_hmac('foo', $data, $key));
32 *** Testing hash_hmac() : error conditions ***
34 -- Testing hash_hmac() function with less than expected no. of arguments --
36 Warning: hash_hmac() expects at least 3 parameters, 0 given in %s on line %d
39 Warning: hash_hmac() expects at least 3 parameters, 1 given in %s on line %d
42 Warning: hash_hmac() expects at least 3 parameters, 2 given in %s on line %d
45 -- Testing hash_hmac() function with more than expected no. of arguments --
47 Warning: hash_hmac() expects at most 4 parameters, 5 given in %s on line %d
50 -- Testing hash_hmac() function with invalid hash algorithm --
52 Warning: hash_hmac(): Unknown hashing algorithm: foo in %s on line %d