26 $info = password_get_info($password);
27 return $info[
'algo'] == PASSWORD_BCRYPT;
35 public static function hash($password) {
36 return password_hash($password, PASSWORD_BCRYPT);
45 public static function verify($password, $passwordHash) {
46 return password_verify($password, $passwordHash);
static hash($password)
Hash the given cleartext password.
static isHashed($password)
Check if the given password is hashed.
The PasswordService class provides services for password handling.
static verify($password, $passwordHash)
Check if the given hash represents the given password.