Hi guys,
On my registration page I have this code:
function myhash($password, $unique_salt)
{
$salt = "f#@V)Hu^%Hgfds";
$hash = sha1($unique_salt . $password);
// make it take 1000 times longer
for ($i = 0; $i < 1000; $i++) {
$hash = sha1($hash);
}
return $hash;
}
function unique_salt()
{
return substr(sha1(mt_rand()),0,22);
}
$phash = myhash($password, unique_salt());
I don't know what to do for the logjn page authentication to ensure I get the same hash code for validation. Would really appreciate the help if someone can post a solution or a alternative answer.
Thanks! (btw i did try using phpass but couldn't get it to work if anyone suggests that)