| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
"""Self-test for hash modules""" |
| 26 |
|
| 27 |
__revision__ = "$Id$" |
| 28 |
|
| 29 |
def get_tests(config={}): |
| 30 |
tests = [] |
| 31 |
from Crypto.SelfTest.Hash import test_HMAC; tests += test_HMAC.get_tests(config=config) |
| 32 |
from Crypto.SelfTest.Hash import test_CMAC; tests += test_CMAC.get_tests(config=config) |
| 33 |
from Crypto.SelfTest.Hash import test_MD2; tests += test_MD2.get_tests(config=config) |
| 34 |
from Crypto.SelfTest.Hash import test_MD4; tests += test_MD4.get_tests(config=config) |
| 35 |
from Crypto.SelfTest.Hash import test_MD5; tests += test_MD5.get_tests(config=config) |
| 36 |
from Crypto.SelfTest.Hash import test_RIPEMD160; tests += test_RIPEMD160.get_tests(config=config) |
| 37 |
from Crypto.SelfTest.Hash import test_SHA1; tests += test_SHA1.get_tests(config=config) |
| 38 |
from Crypto.SelfTest.Hash import test_SHA224; tests += test_SHA224.get_tests(config=config) |
| 39 |
from Crypto.SelfTest.Hash import test_SHA256; tests += test_SHA256.get_tests(config=config) |
| 40 |
from Crypto.SelfTest.Hash import test_SHA384; tests += test_SHA384.get_tests(config=config) |
| 41 |
from Crypto.SelfTest.Hash import test_SHA512; tests += test_SHA512.get_tests(config=config) |
| 42 |
from Crypto.SelfTest.Hash import test_SHA3_224; tests += test_SHA3_224.get_tests(config=config) |
| 43 |
from Crypto.SelfTest.Hash import test_SHA3_256; tests += test_SHA3_256.get_tests(config=config) |
| 44 |
from Crypto.SelfTest.Hash import test_SHA3_384; tests += test_SHA3_384.get_tests(config=config) |
| 45 |
from Crypto.SelfTest.Hash import test_SHA3_512; tests += test_SHA3_512.get_tests(config=config) |
| 46 |
from Crypto.SelfTest.Hash import test_keccak; tests += test_keccak.get_tests(config=config) |
| 47 |
from Crypto.SelfTest.Hash import test_SHAKE; tests += test_SHAKE.get_tests(config=config) |
| 48 |
from Crypto.SelfTest.Hash import test_BLAKE2; tests += test_BLAKE2.get_tests(config=config) |
| 49 |
from Crypto.SelfTest.Hash import test_Poly1305; tests += test_Poly1305.get_tests(config=config) |
| 50 |
from Crypto.SelfTest.Hash import test_cSHAKE; tests += test_cSHAKE.get_tests(config=config) |
| 51 |
from Crypto.SelfTest.Hash import test_KMAC; tests += test_KMAC.get_tests(config=config) |
| 52 |
from Crypto.SelfTest.Hash import test_TupleHash; tests += test_TupleHash.get_tests(config=config) |
| 53 |
from Crypto.SelfTest.Hash import test_KangarooTwelve; tests += test_KangarooTwelve.get_tests(config=config) |
| 54 |
from Crypto.SelfTest.Hash import test_TurboSHAKE; tests += test_TurboSHAKE.get_tests(config=config) |
| 55 |
return tests |
| 56 |
|
| 57 |
if __name__ == '__main__': |
| 58 |
import unittest |
| 59 |
suite = lambda: unittest.TestSuite(get_tests()) |
| 60 |
unittest.main(defaultTest='suite') |
| 61 |
|
| 62 |
|