diff options
-rw-r--r-- | CHANGELOG.rst | 4 | ||||
-rw-r--r-- | cryptography/hazmat/backends/openssl/cmac.py | 1 | ||||
-rw-r--r-- | cryptography/hazmat/primitives/cmac.py | 1 | ||||
-rw-r--r-- | cryptography/hazmat/primitives/interfaces.py | 1 | ||||
-rw-r--r-- | docs/hazmat/primitives/interfaces.rst | 2 |
5 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 70e30e66..689fcfc9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,10 @@ Changelog * More bit-lengths are now support for ``p`` and ``q`` when loading DSA keys from numbers. +* Added `~cryptography.hazmat.primitives.interfaces.MACContext` as a common + interface for CMAC and HMAC and deprecated + `~cryptography.hazmat.primitives.interfaces.CMACContext`. + 0.6.1 - 2014-10-15 ~~~~~~~~~~~~~~~~~~ diff --git a/cryptography/hazmat/backends/openssl/cmac.py b/cryptography/hazmat/backends/openssl/cmac.py index f1d068eb..da7b7484 100644 --- a/cryptography/hazmat/backends/openssl/cmac.py +++ b/cryptography/hazmat/backends/openssl/cmac.py @@ -21,7 +21,6 @@ from cryptography.hazmat.primitives.ciphers.modes import CBC @utils.register_interface(interfaces.MACContext) -@utils.register_interface(interfaces.CMACContext) class _CMACContext(object): def __init__(self, backend, algorithm, ctx=None): if not backend.cmac_algorithm_supported(algorithm): diff --git a/cryptography/hazmat/primitives/cmac.py b/cryptography/hazmat/primitives/cmac.py index 968fa463..7ae5c118 100644 --- a/cryptography/hazmat/primitives/cmac.py +++ b/cryptography/hazmat/primitives/cmac.py @@ -22,7 +22,6 @@ from cryptography.hazmat.primitives import constant_time, interfaces @utils.register_interface(interfaces.MACContext) -@utils.register_interface(interfaces.CMACContext) class CMAC(object): def __init__(self, algorithm, backend, ctx=None): if not isinstance(backend, CMACBackend): diff --git a/cryptography/hazmat/primitives/interfaces.py b/cryptography/hazmat/primitives/interfaces.py index c09a9618..370fd68a 100644 --- a/cryptography/hazmat/primitives/interfaces.py +++ b/cryptography/hazmat/primitives/interfaces.py @@ -495,4 +495,5 @@ class MACContext(object): signature. """ +# DeprecatedIn07 CMACContext = MACContext diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index 2ee2017c..931aa962 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -648,6 +648,8 @@ Key derivation functions .. class:: CMACContext + `CMACContext` has been deprecated in favor of `MACContext`. + .. versionadded:: 0.4 .. method:: update(data) |