aboutsummaryrefslogtreecommitdiffstats
path: root/tests/primitives/test_openssl_vectors.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-10-22 21:45:16 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-10-22 21:45:16 -0500
commit14c3a35447c61e63196a46100a009ee2ea3102a2 (patch)
treea94fb1889f872c6541730a1685e941cd06f05ddf /tests/primitives/test_openssl_vectors.py
parentf4c59767cdfe7716c82a72b00baa427637b505bd (diff)
downloadcryptography-14c3a35447c61e63196a46100a009ee2ea3102a2.tar.gz
cryptography-14c3a35447c61e63196a46100a009ee2ea3102a2.tar.bz2
cryptography-14c3a35447c61e63196a46100a009ee2ea3102a2.zip
split backend up (refs #170)
* Moves cipher methods into a Ciphers class and hash methods to a Hashes class and makes them available inside Backend as pluralized attributes. * Shortened many of the methods since their purpose is now defined by their container class
Diffstat (limited to 'tests/primitives/test_openssl_vectors.py')
-rw-r--r--tests/primitives/test_openssl_vectors.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/primitives/test_openssl_vectors.py b/tests/primitives/test_openssl_vectors.py
index ff42b169..0f242efc 100644
--- a/tests/primitives/test_openssl_vectors.py
+++ b/tests/primitives/test_openssl_vectors.py
@@ -32,7 +32,7 @@ class TestCamelliaCBC(object):
["camellia-cbc.txt"],
lambda key, iv: ciphers.Camellia(binascii.unhexlify(key)),
lambda key, iv: modes.CBC(binascii.unhexlify(iv)),
- only_if=lambda backend: backend.supports_cipher(
+ only_if=lambda backend: backend.ciphers.supported(
ciphers.Camellia("\x00" * 16), modes.CBC("\x00" * 16)
),
skip_message="Does not support Camellia CBC",
@@ -46,7 +46,7 @@ class TestCamelliaOFB(object):
["camellia-ofb.txt"],
lambda key, iv: ciphers.Camellia(binascii.unhexlify(key)),
lambda key, iv: modes.OFB(binascii.unhexlify(iv)),
- only_if=lambda backend: backend.supports_cipher(
+ only_if=lambda backend: backend.ciphers.supported(
ciphers.Camellia("\x00" * 16), modes.OFB("\x00" * 16)
),
skip_message="Does not support Camellia OFB",
@@ -60,7 +60,7 @@ class TestCamelliaCFB(object):
["camellia-cfb.txt"],
lambda key, iv: ciphers.Camellia(binascii.unhexlify(key)),
lambda key, iv: modes.CFB(binascii.unhexlify(iv)),
- only_if=lambda backend: backend.supports_cipher(
+ only_if=lambda backend: backend.ciphers.supported(
ciphers.Camellia("\x00" * 16), modes.CFB("\x00" * 16)
),
skip_message="Does not support Camellia CFB",
@@ -74,7 +74,7 @@ class TestAESCTR(object):
["aes-128-ctr.txt", "aes-192-ctr.txt", "aes-256-ctr.txt"],
lambda key, iv: ciphers.AES(binascii.unhexlify(key)),
lambda key, iv: modes.CTR(binascii.unhexlify(iv)),
- only_if=lambda backend: backend.supports_cipher(
+ only_if=lambda backend: backend.ciphers.supported(
ciphers.AES("\x00" * 16), modes.CTR("\x00" * 16)
),
skip_message="Does not support AES CTR",