verifyPasswordHash() public method

Verify if the $password matches the $hash.
public verifyPasswordHash ( string $password, string $hash ) : boolean
$password string
$hash string
return boolean True if $password matches $hash. Otherwise false is returned.
示例#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->encoder->verifyPasswordHash($password, $hash);
 }
示例#2
0
 public function testVerifyPasswordHashFalse()
 {
     $encoder = new Encoder('\\Webiny\\Component\\Security\\Tests\\Mocks\\EncoderMock');
     $this->assertFalse($encoder->verifyPasswordHash('admin', 'password'));
 }