Beispiel #1
0
 def test_file_checksum(self):
     assert 'B42A17A0F83B737FAF403CAA6B2641AF' == CryptoUtils.file_checksum(
         self.filepath, 'md5', 65535)
     assert '29D1871D6CD6CBDA3D35AB3A1448E58822FA1D55' == CryptoUtils.file_checksum(
         self.filepath, 'sha1', 65535)
     assert '9F2C16E91B305CC547E159DEDC4E34BDE312B120CB2749E418739C01774156FE' == CryptoUtils.file_checksum(
         self.filepath, 'sha256', 65535)
     assert '7A450B78' == CryptoUtils.file_checksum(self.filepath, 'crc32',
                                                    65535)
Beispiel #2
0
 def test_base64_decode(self):
     assert self.base64_decoded_text == CryptoUtils.base64_decode(
         self.base64_encoded_text)
Beispiel #3
0
 def test_hash_calculate(self):
     assert self.hash_encoded_text == CryptoUtils.hash_calculate(
         self.hash_salt_key, self.hash_type, self.hash_text)
Beispiel #4
0
 def test_url_decode(self):
     assert self.url_decoded_text == CryptoUtils.url_decode(
         self.url_encoded_text)
Beispiel #5
0
 def test_bin_decode(self):
     assert self.bin_decoded_text == CryptoUtils.bin_decode(
         self.bin_encoded_text)
 def test_hash_calculate(self):
     self.assertEqual(
         self.hash_encoded_text,
         CryptoUtils.hash_calculate(self.hash_salt_key, self.hash_type,
                                    self.hash_text))
 def test_base64_decode(self):
     self.assertEqual(self.base64_decoded_text,
                      CryptoUtils.base64_decode(self.base64_encoded_text))
 def test_url_decode(self):
     self.assertEqual(self.url_decoded_text,
                      CryptoUtils.url_decode(self.url_encoded_text))