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

@param  string $hash      Hash
@param  string $algorithm Hashing algorithm
@param  bool   $raw       Is the provided hash raw?
@return bool
Returns true if the file matches the provided hash and false if not .