/*
Created By Abraham Aranguren <name.surname@gmail.com> Twitter: @7a_ http://7-a.org
Iterates a salted hash function for secure password storage
Please see this link for more info: http://owasp.com/index.php/Password_Storage_Cheat_Sheet
*/
function GetHash($Password, $SystemSalt, $UserSalt) {
$Hash = $Password
foreach (range(0, 1000000) as $i) {
$Hash = sha512($Hash + $SystemSalt + $UserSalt + $i)
}
return $Hash