Ejemplo n.º 1
0
 def test_sha1_complete_calculation(self):
     """Test sha1 of complete file."""
     res = tools.compute_file_hash(self.filename, sha='sha1')
     self.assertIn(res, (
         '1c12696e1119493a625aa818a35c41916ce32d0c',
         '146121e6d0461916c9a0fab00dc718acdb6a6b14',
     ))
Ejemplo n.º 2
0
 def test_sha224_complete_calculation(self):
     """Test sha224 of complete file."""
     res = tools.compute_file_hash(self.filename, sha='sha224')
     self.assertIn(res, (
         '3d350d9d9eca074bd299cb5ffe1b325a9f589b2bcd7ba1c033ab4d33',
         '4a2cf33b7da01f7b0530b2cc624e1180c8651b20198e9387aee0c767',
     ))
Ejemplo n.º 3
0
 def test_md5_complete_calculation(self):
     """Test md5 of complete file."""
     res = tools.compute_file_hash(self.filename, sha='md5')
     self.assertIn(res, (
         '5d7265e290e6733e1e2020630262a6f3',
         '2c941f2fa7e6e629d165708eb02b67f7',
     ))
Ejemplo n.º 4
0
 def test_sha1_complete_calculation(self):
     """Test sha1 of complete file."""
     res = tools.compute_file_hash(self.filename, sha='sha1')
     self.assertIn(res, (
         '1c12696e1119493a625aa818a35c41916ce32d0c',
         '146121e6d0461916c9a0fab00dc718acdb6a6b14',
     ))
Ejemplo n.º 5
0
 def test_sha224_partial_calculation(self):
     """"Test sha224 of partial file (1024 bytes)."""
     res = tools.compute_file_hash(self.filename,
                                   sha='sha224',
                                   bytes_to_read=1024)
     self.assertEqual(
         res, 'affa8cb79656a9b6244a079f8af91c9271e382aa9d5aa412b599e169')
Ejemplo n.º 6
0
 def test_md5_complete_calculation(self):
     """Test md5 of complete file."""
     res = tools.compute_file_hash(self.filename, sha='md5')
     self.assertIn(res, (
         '5d7265e290e6733e1e2020630262a6f3',
         '2c941f2fa7e6e629d165708eb02b67f7',
     ))
Ejemplo n.º 7
0
 def test_sha224_complete_calculation(self):
     """Test sha224 of complete file."""
     res = tools.compute_file_hash(self.filename, sha='sha224')
     self.assertIn(res, (
         '3d350d9d9eca074bd299cb5ffe1b325a9f589b2bcd7ba1c033ab4d33',
         '4a2cf33b7da01f7b0530b2cc624e1180c8651b20198e9387aee0c767',
     ))
Ejemplo n.º 8
0
 def test_md5_partial_calculation(self):
     """Test md5 of partial file (1024 bytes)."""
     res = tools.compute_file_hash(self.filename, sha='md5',
                                   bytes_to_read=1024)
     self.assertIn(res, (
         'edf6e1accead082b6b831a0a600704bc',
         'be0227b6d490baa49e6d7e131c7f596b',
     ))
Ejemplo n.º 9
0
 def test_sha224_partial_calculation(self):
     """Test sha224 of partial file (1024 bytes)."""
     res = tools.compute_file_hash(self.filename, sha='sha224',
                                   bytes_to_read=1024)
     self.assertIn(res, (
         'affa8cb79656a9b6244a079f8af91c9271e382aa9d5aa412b599e169',
         '486467144e683aefd420d576250c4cc984e6d7bf10c85d36e3d249d2',
     ))
Ejemplo n.º 10
0
 def test_sha1_partial_calculation(self):
     """Test sha1 of partial file (1024 bytes)."""
     res = tools.compute_file_hash(self.filename, sha='sha1',
                                   bytes_to_read=1024)
     self.assertIn(res, (
         'e56fa7bd5cfdf6bb7e2d8649dd9216c03e7271e6',
         '617ce7d539848885b52355ed597a042dae1e726f',
     ))
Ejemplo n.º 11
0
 def test_md5_partial_calculation(self):
     """Test md5 of partial file (1024 bytes)."""
     res = tools.compute_file_hash(self.filename, sha='md5',
                                   bytes_to_read=1024)
     self.assertIn(res, (
         'edf6e1accead082b6b831a0a600704bc',
         'be0227b6d490baa49e6d7e131c7f596b',
     ))
Ejemplo n.º 12
0
 def test_sha224_partial_calculation(self):
     """Test sha224 of partial file (1024 bytes)."""
     res = tools.compute_file_hash(self.filename, sha='sha224',
                                   bytes_to_read=1024)
     self.assertIn(res, (
         'affa8cb79656a9b6244a079f8af91c9271e382aa9d5aa412b599e169',
         '486467144e683aefd420d576250c4cc984e6d7bf10c85d36e3d249d2',
     ))
Ejemplo n.º 13
0
 def test_sha1_partial_calculation(self):
     """Test sha1 of partial file (1024 bytes)."""
     res = tools.compute_file_hash(self.filename, sha='sha1',
                                   bytes_to_read=1024)
     self.assertIn(res, (
         'e56fa7bd5cfdf6bb7e2d8649dd9216c03e7271e6',
         '617ce7d539848885b52355ed597a042dae1e726f',
     ))
Ejemplo n.º 14
0
 def test_md5_complete_calculation(self):
     """"Test md5 of complete file."""
     res = tools.compute_file_hash(self.filename, sha='md5')
     self.assertEqual(res, '5d7265e290e6733e1e2020630262a6f3')
Ejemplo n.º 15
0
 def test_sha224_complete_calculation(self):
     """"Test sha224 of complete file."""
     res = tools.compute_file_hash(self.filename, sha='sha224')
     self.assertEqual(
         res, '3d350d9d9eca074bd299cb5ffe1b325a9f589b2bcd7ba1c033ab4d33')
Ejemplo n.º 16
0
 def test_sha1_partial_calculation(self):
     """"Test sha1 of partial file (1024 bytes)."""
     res = tools.compute_file_hash(self.filename,
                                   sha='sha1',
                                   bytes_to_read=1024)
     self.assertEqual(res, 'e56fa7bd5cfdf6bb7e2d8649dd9216c03e7271e6')
Ejemplo n.º 17
0
 def test_sha1_complete_calculation(self):
     """"Test sha1 of complete file."""
     res = tools.compute_file_hash(self.filename, sha='sha1')
     self.assertEqual(res, '1c12696e1119493a625aa818a35c41916ce32d0c')
Ejemplo n.º 18
0
 def test_md5_partial_calculation(self):
     """"Test md5 of partial file (1024 bytes)."""
     res = tools.compute_file_hash(self.filename,
                                   sha='md5',
                                   bytes_to_read=1024)
     self.assertEqual(res, 'edf6e1accead082b6b831a0a600704bc')