Hi all,
I found these functions on php.et a long time ago and decided to use them in my login-register scripts on my site.
function pw_encode($password)
{
for ($i = 1; $i <= 8; $i++)
$seed .= substr('0123456789abcdef', rand(0,15), 1);
return md5($seed.$password).$seed;
}
function pw_check($password,$stored_value)
{
$stored_seed = substr($stored_value,32,8);
if (md5($stored_seed.$password).$stored_seed == $stored_value)
return TRUE;
else
return FALSE;
}
now this works ok, when someone registers there p/w is encrypted and stored in the database,
What i need to do now is make a password retreival function and im not sure how to.
How can i make a password retreival function. A few on my site have lost thier p/w and i carnt help them as its encrypted.