diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-10-16 17:15:04 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-10-16 17:15:04 -0700 |
commit | ef2f91e6fe694be91ce3a0a37ebaf58d89bb5985 (patch) | |
tree | 1e2087bc24de71fc605a3734db8e357507f83e14 /tests/primitives/test_nist.py | |
parent | 17adce696d5c5fd6f89e11d6fed327cac54f3d79 (diff) | |
download | cryptography-ef2f91e6fe694be91ce3a0a37ebaf58d89bb5985.tar.gz cryptography-ef2f91e6fe694be91ce3a0a37ebaf58d89bb5985.tar.bz2 cryptography-ef2f91e6fe694be91ce3a0a37ebaf58d89bb5985.zip |
Get the tests running
Diffstat (limited to 'tests/primitives/test_nist.py')
-rw-r--r-- | tests/primitives/test_nist.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/primitives/test_nist.py b/tests/primitives/test_nist.py index 1c23fca0..8c8a3818 100644 --- a/tests/primitives/test_nist.py +++ b/tests/primitives/test_nist.py @@ -26,6 +26,16 @@ from .utils import generate_encrypt_test from ..utils import load_nist_vectors_from_file +def load_3des_nist_vectors_from_file(path, op): + vectors = load_nist_vectors_from_file(path, op) + for vector in vectors: + vector["ciphertext"] = vector["ciphertext3"] + del vector["ciphertext1"] + del vector["ciphertext2"] + del vector["ciphertext3"] + return vectors + + class TestAES_CBC(object): test_KAT = generate_encrypt_test( lambda path: load_nist_vectors_from_file(path, "ENCRYPT"), @@ -182,7 +192,7 @@ class TestTripleDES_CBC(object): ) test_KAT2 = generate_encrypt_test( - lambda path: load_nist_vectors_from_file(path, "ENCRYPT"), + lambda path: load_3des_nist_vectors_from_file(path, "ENCRYPT"), os.path.join("3DES", "KAT"), [ "TCBCIpermop.rsp", |