예제 #1
0
    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'))
예제 #2
0
    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'))
예제 #3
0
 def testFileHashMatchesKnownFile(self):
     """Tests that hasher matches the hash of an empty file."""
     hasher = sha1.SHA1Hasher()
     self._AssertTestPathStringDigestMatch(
         hasher, ['ímynd.dd'], 'd9f264323004fd9518c0474967f80421e60e9813')
예제 #4
0
 def testFileHashMatchesEmptyFile(self):
     """Tests that hasher matches the hash of an empty file."""
     hasher = sha1.SHA1Hasher()
     self._AssertTestPathStringDigestMatch(
         hasher, ['empty_file'], 'da39a3ee5e6b4b0d3255bfef95601890afd80709')