| 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 cipher modules""" |
| 26 |
|
| 27 |
__revision__ = "$Id$" |
| 28 |
|
| 29 |
def get_tests(config={}): |
| 30 |
tests = [] |
| 31 |
from Crypto.SelfTest.Cipher import test_AES; tests += test_AES.get_tests(config=config) |
| 32 |
from Crypto.SelfTest.Cipher import test_ARC2; tests += test_ARC2.get_tests(config=config) |
| 33 |
from Crypto.SelfTest.Cipher import test_ARC4; tests += test_ARC4.get_tests(config=config) |
| 34 |
from Crypto.SelfTest.Cipher import test_Blowfish; tests += test_Blowfish.get_tests(config=config) |
| 35 |
from Crypto.SelfTest.Cipher import test_CAST; tests += test_CAST.get_tests(config=config) |
| 36 |
from Crypto.SelfTest.Cipher import test_DES3; tests += test_DES3.get_tests(config=config) |
| 37 |
from Crypto.SelfTest.Cipher import test_DES; tests += test_DES.get_tests(config=config) |
| 38 |
from Crypto.SelfTest.Cipher import test_Salsa20; tests += test_Salsa20.get_tests(config=config) |
| 39 |
from Crypto.SelfTest.Cipher import test_ChaCha20; tests += test_ChaCha20.get_tests(config=config) |
| 40 |
from Crypto.SelfTest.Cipher import test_ChaCha20_Poly1305; tests += test_ChaCha20_Poly1305.get_tests(config=config) |
| 41 |
from Crypto.SelfTest.Cipher import test_pkcs1_15; tests += test_pkcs1_15.get_tests(config=config) |
| 42 |
from Crypto.SelfTest.Cipher import test_pkcs1_oaep; tests += test_pkcs1_oaep.get_tests(config=config) |
| 43 |
from Crypto.SelfTest.Cipher import test_OCB; tests += test_OCB.get_tests(config=config) |
| 44 |
from Crypto.SelfTest.Cipher import test_CBC; tests += test_CBC.get_tests(config=config) |
| 45 |
from Crypto.SelfTest.Cipher import test_CFB; tests += test_CFB.get_tests(config=config) |
| 46 |
from Crypto.SelfTest.Cipher import test_OpenPGP; tests += test_OpenPGP.get_tests(config=config) |
| 47 |
from Crypto.SelfTest.Cipher import test_OFB; tests += test_OFB.get_tests(config=config) |
| 48 |
from Crypto.SelfTest.Cipher import test_CTR; tests += test_CTR.get_tests(config=config) |
| 49 |
from Crypto.SelfTest.Cipher import test_CCM; tests += test_CCM.get_tests(config=config) |
| 50 |
from Crypto.SelfTest.Cipher import test_EAX; tests += test_EAX.get_tests(config=config) |
| 51 |
from Crypto.SelfTest.Cipher import test_GCM; tests += test_GCM.get_tests(config=config) |
| 52 |
from Crypto.SelfTest.Cipher import test_SIV; tests += test_SIV.get_tests(config=config) |
| 53 |
return tests |
| 54 |
|
| 55 |
if __name__ == '__main__': |
| 56 |
import unittest |
| 57 |
suite = lambda: unittest.TestSuite(get_tests()) |
| 58 |
unittest.main(defaultTest='suite') |
| 59 |
|
| 60 |
|