diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-27 08:48:53 -0600 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-27 08:48:53 -0600 |
commit | bb30eb160045181b0c91fc9f2d8f374d65c2c13b (patch) | |
tree | 46009a3261034571d1549f36f5c5d196cbd2f7a7 /tests/hazmat/primitives/utils.py | |
parent | 3c25f61c18c6f8f9a2210fb2124654023bcec775 (diff) | |
parent | e60e1d782cb7c1abe68811092f7db342ed14b81f (diff) | |
download | cryptography-bb30eb160045181b0c91fc9f2d8f374d65c2c13b.tar.gz cryptography-bb30eb160045181b0c91fc9f2d8f374d65c2c13b.tar.bz2 cryptography-bb30eb160045181b0c91fc9f2d8f374d65c2c13b.zip |
Merge branch 'master' into validate-iv
Conflicts:
tests/hazmat/primitives/test_block.py
Diffstat (limited to 'tests/hazmat/primitives/utils.py')
-rw-r--r-- | tests/hazmat/primitives/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/hazmat/primitives/utils.py b/tests/hazmat/primitives/utils.py index 9327b0eb..6c67ddb3 100644 --- a/tests/hazmat/primitives/utils.py +++ b/tests/hazmat/primitives/utils.py @@ -42,7 +42,7 @@ def encrypt_test(backend, cipher_factory, mode_factory, params, only_if, cipher = Cipher( cipher_factory(**params), mode_factory(**params), - backend + backend=backend ) encryptor = cipher.encryptor() actual_ciphertext = encryptor.update(binascii.unhexlify(plaintext)) @@ -82,7 +82,7 @@ def stream_encryption_test(backend, cipher_factory, params, only_if, plaintext = params.pop("plaintext") ciphertext = params.pop("ciphertext") offset = params.pop("offset") - cipher = Cipher(cipher_factory(**params), None, backend) + cipher = Cipher(cipher_factory(**params), None, backend=backend) encryptor = cipher.encryptor() # throw away offset bytes encryptor.update(b"\x00" * int(offset)) @@ -211,7 +211,7 @@ def hmac_test(backend, algorithm, params, only_if, skip_message): msg = params[0] md = params[1] key = params[2] - h = hmac.HMAC(binascii.unhexlify(key), algorithm) + h = hmac.HMAC(binascii.unhexlify(key), algorithm, backend=backend) h.update(binascii.unhexlify(msg)) assert h.finalize() == binascii.unhexlify(md.encode("ascii")) @@ -233,7 +233,7 @@ def base_hmac_test(backend, algorithm, only_if, skip_message): if only_if is not None and not only_if(backend): pytest.skip(skip_message) key = b"ab" - h = hmac.HMAC(binascii.unhexlify(key), algorithm) + h = hmac.HMAC(binascii.unhexlify(key), algorithm, backend=backend) h_copy = h.copy() assert h != h_copy assert h._ctx != h_copy._ctx |