src/mako/file/FileInfo.php
public function validateHmac(string $hmac, string $key, string $algorithm = 'sha256', bool $raw = false): bool
	{
		return hash_equals($hmac, $this->getHmac($key, $algorithm, $raw));
	}
public function validateHmac(string $hmac, string $key, string $algorithm = 'sha256', bool $raw = false): bool
	{
		return hash_equals($hmac, $this->getHmac($key, $algorithm, $raw));
	}
public function validateHmac ( string $ hmac , string $ key , string $ algorithm = 'sha256' , bool $ raw = false ) : bool { return hash_equals ( $ hmac , $ this -> getHmac ( $ key , $ algorithm , $ raw ) ) ; }
Returns true if the file matches the provided HMAC and false if not.

@param  string $hmac      HMAC
@param  string $key       Key
@param  string $algorithm Hashing algorithm
@param  bool   $raw       Is the provided HMAC raw?
@return bool
Returns true if the file matches the provided HMAC and false if not .