PHP Hash Generator - MD5, SHA1 etc..


2009-08-22 Digg! icurtain Delcious icurtain Technorati icurtain

The Hash maker is a quick and easy way to either make hashes and use them directly or try to work out what your lost password was

I find it quite useful to be able to generate hashes for passwords directly for the purposes of resetting passwords directly in a database

hash of: hashText using: haval256,5

length: 64 digits

PHP Hash example for login session:

  1. if(isset($_POST["userInput"])){ 
  2.    $userInput = strip_tags($_POST["userInput"]); 
  3. }else{ 
  4.    return; 
  5.  
  6. if($hashFromDatabase == hash("haval256,5", $userInput)){ 
  7.    $_SESSION["loggedIn"] = $userName; 
  8. }

More info on 2 of the most common hashes SHA, MD5