Webiny\Component\Crypt\Crypt::verifyPasswordHash PHP Method

verifyPasswordHash() public method

Verify if the given $hash matches the given $password.
public verifyPasswordHash ( string $password, string $hash ) : boolean
$password string Original, un-hashed, password.
$hash string Hash string to which the check should be made
return boolean True if $password matches the $hash, otherwise false is returned.
    public function verifyPasswordHash($password, $hash)
    {
        try {
            return $this->driverInstance->verifyPasswordHash($password, $hash);
        } catch (\Exception $e) {
            throw new CryptException($e->getMessage());
        }
    }

Usage Example

Beispiel #1
0
 /**
  * Verify if the $password matches the $hash.
  *
  * @param string $password
  * @param string $hash
  *
  * @return bool True if $password matches $hash. Otherwise false is returned.
  */
 public function verifyPasswordHash($password, $hash)
 {
     return $this->instance->verifyPasswordHash($password, $hash);
 }
All Usage Examples Of Webiny\Component\Crypt\Crypt::verifyPasswordHash