verify() public static method

Check the validity of a hash.
public static verify ( string $input, string $hash, string $password ) : boolean
$input string Input to test.
$hash string Known hash to validate against.
$password string HMAC password to use during iterative hash.
return boolean
Beispiel #1
0
 public function testVector()
 {
     $input = 'hello world';
     $key = 'password';
     $vector = base64_decode('TzYfV/BWvqbGDNaX8fK81PcNol+zgs7KMxelj9aOGmmMa9cRKZGXwVOlLBn4Z0qdnDDCpSg9AUqXHZyzVqzztA==');
     $this->assertTrue(Hash::verify($input, $vector, $key));
 }