public static function checksum($filePath, Key $key = null, $raw = false) : string
{
if (\is_resource($filePath) || \is_string($filePath)) {
$readOnly = new ReadOnlyFile($filePath);
$checksum = self::checksumData($readOnly, $key, $raw);
$readOnly->close();
return $checksum;
}
throw new InvalidType('Argument 1: Expected a filename or resource');
}