validateHmac() public method

Tests if a string $string matches the HMAC given by $hash.
public validateHmac ( string $string, string $hmac ) : boolean
$string string The string which should be validated
$hmac string The hash of the string
return boolean TRUE if string and hash fit together, FALSE otherwise.
 /**
  * @test
  */
 public function generatedHashWillNotBeValidatedIfHashHasBeenChanged()
 {
     $string = 'asdf';
     $hash = 'myhash';
     $this->assertFalse($this->hashService->validateHmac($string, $hash));
 }