How to ReHash a password stored into my Database ? (PHP)
- by Vincent Roye
Hi!
I have some passwords encrypted in my database and I would like to find a way to display them. Here is how they are saved into my mysql database:
function generateHash($plainText, $salt = null){
                if ($salt === null)
  {
   $salt = substr(md5(uniqid(rand(), true)), 0, 25);
  }
  else
  {
   $salt = substr($salt, 0, 25);
  }
  return $salt . sha1($salt . $plainText);
 }
        $secure_pass = generateHash($this->clean_password);
Then $secure_pass is saved into my database.
Anyone would have an idea ??
Thank you very much ;)