Lines Matching refs:hash_pbkdf2
2 Test hash_pbkdf2() function : error functionality
8 /* {{{ proto string hash_pbkdf2(string algo, string password, string salt, int iterations [, int le…
12 echo "*** Testing hash_pbkdf2() : error conditions ***\n";
17 echo "\n-- Testing hash_pbkdf2() function with less than expected no. of arguments --\n";
18 var_dump(@hash_pbkdf2());
20 var_dump(@hash_pbkdf2('crc32'));
22 var_dump(@hash_pbkdf2('crc32', $password));
24 var_dump(@hash_pbkdf2('crc32', $password, $salt));
27 echo "\n-- Testing hash_pbkdf2() function with more than expected no. of arguments --\n";
28 var_dump(@hash_pbkdf2('crc32', $password, $salt, 10, 10, true, 'extra arg'));
31 echo "\n-- Testing hash_pbkdf2() function with invalid hash algorithm --\n";
32 var_dump(@hash_pbkdf2('foo', $password, $salt, 1));
35 echo "\n-- Testing hash_pbkdf2() function with invalid iterations --\n";
36 var_dump(@hash_pbkdf2('md5', $password, $salt, 0));
38 var_dump(@hash_pbkdf2('md5', $password, $salt, -1));
41 echo "\n-- Testing hash_pbkdf2() function with invalid length --\n";
42 var_dump(@hash_pbkdf2('md5', $password, $salt, 1, -1));
48 *** Testing hash_pbkdf2() : error conditions ***
50 -- Testing hash_pbkdf2() function with less than expected no. of arguments --
52 hash_pbkdf2() expects at least 4 parameters, 0 given
54 hash_pbkdf2() expects at least 4 parameters, 1 given
56 hash_pbkdf2() expects at least 4 parameters, 2 given
58 hash_pbkdf2() expects at least 4 parameters, 3 given
60 -- Testing hash_pbkdf2() function with more than expected no. of arguments --
62 hash_pbkdf2() expects at most 6 parameters, 7 given
64 -- Testing hash_pbkdf2() function with invalid hash algorithm --
66 hash_pbkdf2(): Unknown hashing algorithm: foo
68 -- Testing hash_pbkdf2() function with invalid iterations --
70 hash_pbkdf2(): Iterations must be a positive integer: 0
72 hash_pbkdf2(): Iterations must be a positive integer: -1
74 -- Testing hash_pbkdf2() function with invalid length --
76 hash_pbkdf2(): Length must be greater than or equal to 0: -1