Method | Description | |
---|---|---|
hashPassword ( string $password, string $staticSalt = null ) : string | Hash a password for storage | |
validatePassword ( string $password, string $hashedPasswordAndSalt, string $staticSalt = null ) : boolean | Validate a hashed password against a cleartext password |
public validatePassword ( string $password, string $hashedPasswordAndSalt, string $staticSalt = null ) : boolean | ||
$password | string | |
$hashedPasswordAndSalt | string | Hashed password with dynamic salt (if used) |
$staticSalt | string | Optional static salt that will not be stored in the hashed password |
return | boolean | TRUE if the given cleartext password matched the hashed password |