I copied the title from another question, but it wasn't answered there and my case is a bit different.
I have inherited an old website to maintain. I noticed that the password hashing is not up to modern best practices, but I would like to understand if it is reasonably safe or needs changing.
Here is the code that does the hashing:
public function changePW($password)
{
//
$new_salt = $this->random();
$new_password = $this->hash($password, $new_salt);
//
}
public function random($limit = 10, $from = 32, $to = 126) {
$phrase = '';
for ($i=0; $i<$limit; $i++) {
$phrase .= chr(rand($from,$to));
}
return $phrase;
}
// self::$_salt is a constant 12 character string
// of 3 words with some letters replaced by numbers
public static function hash($password, $salt) {
return hash('whirlpool', self::$_salt . $password . $salt);
}
Should I consider this procedure flawed/vulnerable for passwords of 8 characters and longer?