diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-01 08:11:13 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-01 08:11:13 -0800 |
commit | 2a160d6a159817dd9d08a84e77d102e328f9af4f (patch) | |
tree | 461b7c607367f243bb46996ec16ad7424e48d440 /tests/hazmat/primitives/test_arc4.py | |
parent | 62aefffb1396190930074bf04c91459d1536bd0e (diff) | |
parent | 522487e5a7dd3004747da85c9f6c53fc5dc4de06 (diff) | |
download | cryptography-2a160d6a159817dd9d08a84e77d102e328f9af4f.tar.gz cryptography-2a160d6a159817dd9d08a84e77d102e328f9af4f.tar.bz2 cryptography-2a160d6a159817dd9d08a84e77d102e328f9af4f.zip |
Merge branch 'master' into validate-iv
Conflicts:
tests/hazmat/backends/test_openssl.py
tests/hazmat/primitives/test_block.py
Diffstat (limited to 'tests/hazmat/primitives/test_arc4.py')
-rw-r--r-- | tests/hazmat/primitives/test_arc4.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/hazmat/primitives/test_arc4.py b/tests/hazmat/primitives/test_arc4.py index d233bec2..33f7ff09 100644 --- a/tests/hazmat/primitives/test_arc4.py +++ b/tests/hazmat/primitives/test_arc4.py @@ -16,12 +16,21 @@ from __future__ import absolute_import, division, print_function import binascii import os +import pytest + from cryptography.hazmat.primitives.ciphers import algorithms from .utils import generate_stream_encryption_test from ...utils import load_nist_vectors +@pytest.mark.supported( + only_if=lambda backend: backend.cipher_supported( + algorithms.ARC4("\x00" * 16), None + ), + skip_message="Does not support ARC4", +) +@pytest.mark.cipher class TestARC4(object): test_rfc = generate_stream_encryption_test( load_nist_vectors, @@ -35,9 +44,5 @@ class TestARC4(object): "rfc-6229-192.txt", "rfc-6229-256.txt", ], - lambda key: algorithms.ARC4(binascii.unhexlify((key))), - only_if=lambda backend: backend.cipher_supported( - algorithms.ARC4("\x00" * 16), None - ), - skip_message="Does not support ARC4", + lambda key, **kwargs: algorithms.ARC4(binascii.unhexlify(key)), ) |