Passwords hashed with a different cost can be validated by using the cost parameter of the
hashed password and salt.
public validatePassword ( string $password, string $hashedPasswordAndSalt, string $staticSalt = null ) : boolean | ||
$password | string | The cleartext password |
$hashedPasswordAndSalt | string | The derived key and salt in as returned by crypt() for verification |
$staticSalt | string | Optional static salt that will be appended to the dynamic salt |
Résultat | boolean | TRUE if the given password matches the hashed password |