aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2019-03-08 09:53:09 +0800
committerAlex Gaynor <alex.gaynor@gmail.com>2019-03-07 20:53:09 -0500
commit6d04e958abef078042c9a82ddbaa2d3c384db4fa (patch)
treec542bb6c8784a762f192244ebe75f5f19f35fa7c /docs
parent88d836e10d090dfedc4b88a0fe302c77382a8211 (diff)
downloadcryptography-6d04e958abef078042c9a82ddbaa2d3c384db4fa.tar.gz
cryptography-6d04e958abef078042c9a82ddbaa2d3c384db4fa.tar.bz2
cryptography-6d04e958abef078042c9a82ddbaa2d3c384db4fa.zip
remove maccontext (#4803)
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/backends/interfaces.rst5
-rw-r--r--docs/hazmat/primitives/mac/index.rst40
2 files changed, 6 insertions, 39 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 2c2d70ec..36dd3a7a 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -159,14 +159,13 @@ A specific ``backend`` may provide one or more of these interfaces.
.. method:: create_cmac_ctx(algorithm)
Create a
- :class:`~cryptography.hazmat.primitives.mac.MACContext` that
+ context that
uses the specified ``algorithm`` to calculate a message authentication code.
:param algorithm: An instance of
:class:`~cryptography.hazmat.primitives.ciphers.BlockCipherAlgorithm`.
- :returns:
- :class:`~cryptography.hazmat.primitives.mac.MACContext`
+ :returns: CMAC object.
.. class:: PBKDF2HMACBackend
diff --git a/docs/hazmat/primitives/mac/index.rst b/docs/hazmat/primitives/mac/index.rst
index 86c407c4..f85eaa0e 100644
--- a/docs/hazmat/primitives/mac/index.rst
+++ b/docs/hazmat/primitives/mac/index.rst
@@ -3,48 +3,16 @@
Message authentication codes
============================
-While cryptography supports both the CMAC and HMAC algorithms, we strongly
-recommend that HMAC should be used unless you have a good reason otherwise.
+While cryptography supports multiple MAC algorithms, we strongly
+recommend that HMAC should be used unless you have a very specific need.
For more information on why HMAC is preferred, see `Use cases for CMAC vs.
HMAC?`_
-HMAC and CMAC both use the ``MACContext`` interface:
-
-.. currentmodule:: cryptography.hazmat.primitives.mac
-
-.. class:: MACContext
-
- .. versionadded:: 0.7
-
- .. method:: update(data)
-
- :param bytes data: The data you want to authenticate.
-
- .. method:: finalize()
-
- :return: The message authentication code.
-
- .. method:: copy()
-
- :return: A
- :class:`~cryptography.hazmat.primitives.mac.MACContext` that
- is a copy of the current context.
-
- .. method:: verify(signature)
-
- :param bytes signature: The signature to verify.
-
- :raises cryptography.exceptions.InvalidSignature: This is raised when
- the provided signature does not match the expected signature.
-
-
-
-.. _`CMAC`: https://en.wikipedia.org/wiki/CMAC
-.. _`Use cases for CMAC vs. HMAC?`: https://crypto.stackexchange.com/questions/15721/use-cases-for-cmac-vs-hmac
-
.. toctree::
:maxdepth: 1
cmac
hmac
+
+.. _`Use cases for CMAC vs. HMAC?`: https://crypto.stackexchange.com/questions/15721/use-cases-for-cmac-vs-hmac