Is there an obvious flaw with this hashing function (written in PHP)?
function hash($password) {
sleep(1); // Make hashing slow
$hash = "";
$iterations = strlen($password);
for ( $i = 0; $i < $iterations; $i++ ) {
$hash = hash('sha512', USER_PASSWORD_SALT . $password);
}
return $hash;
}
sleep(1)
in your implementation doesn't directly affect attackers. May as well remove it.