aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_camellia.py
diff options
context:
space:
mode:
authorJulian Krause <julian.krause@gmail.com>2013-12-25 12:58:40 -0800
committerJulian Krause <julian.krause@gmail.com>2013-12-25 12:58:40 -0800
commite62760af74ebb8b08d7670dfaff177cdeb679f0f (patch)
tree70e51d6aadff7d1ec204793b12de221610204254 /tests/hazmat/primitives/test_camellia.py
parentc91fe6a21fbae3107de7b2e53b7343cd67ac8c6d (diff)
parent0865a8b81075bfe073aba56e03cc57c30bfffe00 (diff)
downloadcryptography-e62760af74ebb8b08d7670dfaff177cdeb679f0f.tar.gz
cryptography-e62760af74ebb8b08d7670dfaff177cdeb679f0f.tar.bz2
cryptography-e62760af74ebb8b08d7670dfaff177cdeb679f0f.zip
Merge branch 'master' of https://github.com/pyca/cryptography into verify
Conflicts: tests/hazmat/primitives/test_hashes.py tests/hazmat/primitives/test_hmac.py
Diffstat (limited to 'tests/hazmat/primitives/test_camellia.py')
-rw-r--r--tests/hazmat/primitives/test_camellia.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/hazmat/primitives/test_camellia.py b/tests/hazmat/primitives/test_camellia.py
index a2c935d9..c376220e 100644
--- a/tests/hazmat/primitives/test_camellia.py
+++ b/tests/hazmat/primitives/test_camellia.py
@@ -16,6 +16,8 @@ from __future__ import absolute_import, division, print_function
import binascii
import os
+import pytest
+
from cryptography.hazmat.primitives.ciphers import algorithms, modes
from .utils import generate_encrypt_test
@@ -24,6 +26,7 @@ from ...utils import (
)
+@pytest.mark.cipher
class TestCamellia(object):
test_ECB = generate_encrypt_test(
load_cryptrec_vectors,
@@ -33,8 +36,8 @@ class TestCamellia(object):
"camellia-192-ecb.txt",
"camellia-256-ecb.txt"
],
- lambda key: algorithms.Camellia(binascii.unhexlify((key))),
- lambda key: modes.ECB(),
+ lambda key, **kwargs: algorithms.Camellia(binascii.unhexlify(key)),
+ lambda **kwargs: modes.ECB(),
only_if=lambda backend: backend.cipher_supported(
algorithms.Camellia("\x00" * 16), modes.ECB()
),
@@ -45,8 +48,8 @@ class TestCamellia(object):
load_openssl_vectors,
os.path.join("ciphers", "Camellia"),
["camellia-cbc.txt"],
- lambda key, iv: algorithms.Camellia(binascii.unhexlify(key)),
- lambda key, iv: modes.CBC(binascii.unhexlify(iv)),
+ lambda key, **kwargs: algorithms.Camellia(binascii.unhexlify(key)),
+ lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)),
only_if=lambda backend: backend.cipher_supported(
algorithms.Camellia("\x00" * 16), modes.CBC("\x00" * 16)
),
@@ -57,8 +60,8 @@ class TestCamellia(object):
load_openssl_vectors,
os.path.join("ciphers", "Camellia"),
["camellia-ofb.txt"],
- lambda key, iv: algorithms.Camellia(binascii.unhexlify(key)),
- lambda key, iv: modes.OFB(binascii.unhexlify(iv)),
+ lambda key, **kwargs: algorithms.Camellia(binascii.unhexlify(key)),
+ lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)),
only_if=lambda backend: backend.cipher_supported(
algorithms.Camellia("\x00" * 16), modes.OFB("\x00" * 16)
),
@@ -69,8 +72,8 @@ class TestCamellia(object):
load_openssl_vectors,
os.path.join("ciphers", "Camellia"),
["camellia-cfb.txt"],
- lambda key, iv: algorithms.Camellia(binascii.unhexlify(key)),
- lambda key, iv: modes.CFB(binascii.unhexlify(iv)),
+ lambda key, **kwargs: algorithms.Camellia(binascii.unhexlify(key)),
+ lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv)),
only_if=lambda backend: backend.cipher_supported(
algorithms.Camellia("\x00" * 16), modes.CFB("\x00" * 16)
),