Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /*
  2.    Created By Abraham Aranguren <name.surname@gmail.com> Twitter: @7a_ http://7-a.org
  3.    Iterates a salted hash function for secure password storage
  4.    Please see this link for more info: http://owasp.com/index.php/Password_Storage_Cheat_Sheet
  5. */
  6. function GetHash($Password, $SystemSalt, $UserSalt) {
  7.     $Hash = $Password
  8.     foreach (range(0, 1000000) as $i) {
  9.         $Hash = sha512($Hash + $SystemSalt + $UserSalt + $i)
  10.     }
  11.     return $Hash