diff options
author | Terry Chia <terrycwk1994@gmail.com> | 2014-10-20 12:15:22 +0800 |
---|---|---|
committer | Terry Chia <terrycwk1994@gmail.com> | 2014-10-20 22:59:27 +0800 |
commit | c7c82f3849f33d34637fa133fc906efbc4fd6aef (patch) | |
tree | fb7eb40edfee96637fce3835f9f387f9ac3a5b16 | |
parent | 73cb687bcf87fbb7d392c998bd3ad619b58fa6b0 (diff) | |
download | cryptography-c7c82f3849f33d34637fa133fc906efbc4fd6aef.tar.gz cryptography-c7c82f3849f33d34637fa133fc906efbc4fd6aef.tar.bz2 cryptography-c7c82f3849f33d34637fa133fc906efbc4fd6aef.zip |
Add to changelog. Document deprecation.
-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) |