def testFileHashMatchesKnownFile(self): """Tests that hasher matches the hash of an empty file.""" expected_sha1 = 'd9f264323004fd9518c0474967f80421e60e9813' hasher = sha1.SHA1Hasher() self._AssertTestPathStringDigestMatch(hasher, ['ímynd.dd'], expected_sha1) hasher = sha1.SHA1Hasher() self._AssertTestPathBinaryDigestMatch(hasher, ['ímynd.dd'], expected_sha1.decode('hex'))
def testFileHashMatchesEmptyFile(self): """Tests that hasher matches the hash of an empty file.""" expected_sha1 = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' hasher = sha1.SHA1Hasher() self._AssertTestPathStringDigestMatch(hasher, ['empty_file'], expected_sha1) hasher = sha1.SHA1Hasher() self._AssertTestPathBinaryDigestMatch(hasher, ['empty_file'], expected_sha1.decode('hex'))
def testFileHashMatchesKnownFile(self): """Tests that hasher matches the hash of an empty file.""" hasher = sha1.SHA1Hasher() self._AssertTestPathStringDigestMatch( hasher, ['ímynd.dd'], 'd9f264323004fd9518c0474967f80421e60e9813')
def testFileHashMatchesEmptyFile(self): """Tests that hasher matches the hash of an empty file.""" hasher = sha1.SHA1Hasher() self._AssertTestPathStringDigestMatch( hasher, ['empty_file'], 'da39a3ee5e6b4b0d3255bfef95601890afd80709')