I'm trying to do a function to hash passwords with this php function: http://be.php.net/manual/en/function.hash-pbkdf2.php.
Here is the code:
$hash_algo = "sha256";
$password = "password";
$salt = "salt";
$iterations = 1;
$length = 1;
$raw_output = false;
$hash = hash_pbkdf2($hash_algo, $password, $salt, $iterations ,$length ,$raw_output);
echo $hash;
I got this error: Fatal error: Call to undefined function hash_pbkdf2().
How can the function be undefined???
PS: All the values of my variables are set just for testing the function. Obviously the salt will not be "salt", etc.