diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-07 14:25:44 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-07 14:25:44 -0800 |
commit | 60f1d8b89cf7eb6f4d58eed7be9b816056c1df9c (patch) | |
tree | 5912a5ebeec4f4ffe8ecd6b0fd11b1794a8772c5 /tests/hazmat/primitives/test_blowfish.py | |
parent | 105e8137799a2ef7ec8275e3c01d61a04884413b (diff) | |
parent | 635b542ded9ede772a2ca907e8bb5349ded333bd (diff) | |
download | cryptography-60f1d8b89cf7eb6f4d58eed7be9b816056c1df9c.tar.gz cryptography-60f1d8b89cf7eb6f4d58eed7be9b816056c1df9c.tar.bz2 cryptography-60f1d8b89cf7eb6f4d58eed7be9b816056c1df9c.zip |
Merge branch 'master' into fernet
Diffstat (limited to 'tests/hazmat/primitives/test_blowfish.py')
-rw-r--r-- | tests/hazmat/primitives/test_blowfish.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/hazmat/primitives/test_blowfish.py b/tests/hazmat/primitives/test_blowfish.py index cd5e03a4..a7f13823 100644 --- a/tests/hazmat/primitives/test_blowfish.py +++ b/tests/hazmat/primitives/test_blowfish.py @@ -16,7 +16,7 @@ from __future__ import absolute_import, division, print_function import binascii import os -from cryptography.hazmat.primitives.block import ciphers, modes +from cryptography.hazmat.primitives.ciphers import algorithms, modes from .utils import generate_encrypt_test from ...utils import load_nist_vectors_from_file @@ -27,10 +27,10 @@ class TestBlowfish(object): lambda path: load_nist_vectors_from_file(path, "ENCRYPT"), os.path.join("ciphers", "Blowfish"), ["bf-ecb.txt"], - lambda key: ciphers.Blowfish(binascii.unhexlify(key)), + lambda key: algorithms.Blowfish(binascii.unhexlify(key)), lambda key: modes.ECB(), only_if=lambda backend: backend.ciphers.supported( - ciphers.Blowfish("\x00" * 56), modes.ECB() + algorithms.Blowfish("\x00" * 56), modes.ECB() ), skip_message="Does not support Blowfish ECB", ) @@ -39,10 +39,10 @@ class TestBlowfish(object): lambda path: load_nist_vectors_from_file(path, "ENCRYPT"), os.path.join("ciphers", "Blowfish"), ["bf-cbc.txt"], - lambda key, iv: ciphers.Blowfish(binascii.unhexlify(key)), + lambda key, iv: algorithms.Blowfish(binascii.unhexlify(key)), lambda key, iv: modes.CBC(binascii.unhexlify(iv)), only_if=lambda backend: backend.ciphers.supported( - ciphers.Blowfish("\x00" * 56), modes.CBC("\x00" * 8) + algorithms.Blowfish("\x00" * 56), modes.CBC("\x00" * 8) ), skip_message="Does not support Blowfish CBC", ) @@ -51,10 +51,10 @@ class TestBlowfish(object): lambda path: load_nist_vectors_from_file(path, "ENCRYPT"), os.path.join("ciphers", "Blowfish"), ["bf-ofb.txt"], - lambda key, iv: ciphers.Blowfish(binascii.unhexlify(key)), + lambda key, iv: algorithms.Blowfish(binascii.unhexlify(key)), lambda key, iv: modes.OFB(binascii.unhexlify(iv)), only_if=lambda backend: backend.ciphers.supported( - ciphers.Blowfish("\x00" * 56), modes.OFB("\x00" * 8) + algorithms.Blowfish("\x00" * 56), modes.OFB("\x00" * 8) ), skip_message="Does not support Blowfish OFB", ) @@ -63,10 +63,10 @@ class TestBlowfish(object): lambda path: load_nist_vectors_from_file(path, "ENCRYPT"), os.path.join("ciphers", "Blowfish"), ["bf-cfb.txt"], - lambda key, iv: ciphers.Blowfish(binascii.unhexlify(key)), + lambda key, iv: algorithms.Blowfish(binascii.unhexlify(key)), lambda key, iv: modes.CFB(binascii.unhexlify(iv)), only_if=lambda backend: backend.ciphers.supported( - ciphers.Blowfish("\x00" * 56), modes.CFB("\x00" * 8) + algorithms.Blowfish("\x00" * 56), modes.CFB("\x00" * 8) ), skip_message="Does not support Blowfish CFB", ) |