diff options
author | Ayrx <terrycwk1994@gmail.com> | 2014-04-22 12:00:43 +0800 |
---|---|---|
committer | Ayrx <terrycwk1994@gmail.com> | 2014-04-22 12:12:41 +0800 |
commit | 3881917b59c49ab1616b61a696a74aa195c710e0 (patch) | |
tree | d535cadb781c22adeee4d5c9d4df804c020d5904 /tests/hazmat/primitives/test_cmac.py | |
parent | a93abae0a62f4da67fb51a77dc0acafe2d04f99c (diff) | |
download | cryptography-3881917b59c49ab1616b61a696a74aa195c710e0.tar.gz cryptography-3881917b59c49ab1616b61a696a74aa195c710e0.tar.bz2 cryptography-3881917b59c49ab1616b61a696a74aa195c710e0.zip |
Added more copy() tests
Diffstat (limited to 'tests/hazmat/primitives/test_cmac.py')
-rw-r--r-- | tests/hazmat/primitives/test_cmac.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_cmac.py b/tests/hazmat/primitives/test_cmac.py index 25568114..f47f2c13 100644 --- a/tests/hazmat/primitives/test_cmac.py +++ b/tests/hazmat/primitives/test_cmac.py @@ -181,6 +181,13 @@ class TestCMAC(object): with pytest.raises(TypeError): cmac.verify(six.u('')) + def test_copy_with_backend(self, backend): + key = b"2b7e151628aed2a6abf7158809cf4f3c" + cmac = CMAC(AES(key), backend) + cmac.update(b"6bc1bee22e409f96e93d7e117393172a") + copy_cmac = cmac.copy() + assert cmac.finalize() == copy_cmac.finalize() + def test_copy(): @utils.register_interface(CMACBackend) |