aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-10-20 16:48:59 -0700
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-10-20 16:48:59 -0700
commit126afca70edc3fac2e493c6b7cd05219c8d8e373 (patch)
treee4c0081f7f153eb551b284d45ab945d851b26af1 /docs
parenta31e26f0dca915ccbb2e5e87a929b6bbc154c3c3 (diff)
parent7d15688fe0c64d324691fc3886bcc9a5cdba62d1 (diff)
downloadcryptography-126afca70edc3fac2e493c6b7cd05219c8d8e373.tar.gz
cryptography-126afca70edc3fac2e493c6b7cd05219c8d8e373.tar.bz2
cryptography-126afca70edc3fac2e493c6b7cd05219c8d8e373.zip
Merge pull request #1423 from alex/pr/1396
Add MACContext and switch HMAC and CMAC to use it
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/primitives/interfaces.rst30
1 files changed, 28 insertions, 2 deletions
diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst
index 2d594c8d..4cb64c83 100644
--- a/docs/hazmat/primitives/interfaces.rst
+++ b/docs/hazmat/primitives/interfaces.rst
@@ -643,11 +643,13 @@ Key derivation functions
stored derived key.
-`CMAC`_
--------
+`Message Authentication Code`_
+------------------------------
.. class:: CMACContext
+ :class:`CMACContext` has been deprecated in favor of :class:`MACContext`.
+
.. versionadded:: 0.4
.. method:: update(data)
@@ -663,6 +665,30 @@ Key derivation functions
:return: A :class:`~cryptography.hazmat.primitives.interfaces.CMACContext`
that is a copy of the current context.
+.. class:: MACContext
+
+ .. versionadded:: 0.7
+
+ .. method:: update(data)
+
+ :param data bytes: The data you want to authenticate.
+
+ .. method:: finalize()
+
+ :return: The message authentication code.
+
+ .. method:: copy()
+
+ :return: A
+ :class:`~cryptography.hazmat.primitives.interfaces.MACContext` that
+ is a copy of the current context.
+
+ .. method:: verify(signature)
+
+ :param signature bytes: The signature to verify.
+
+ :raises cryptography.exceptions.InvalidSignature: This is raised when
+ the provided signature does not match the expected signature.
.. _`RSA`: https://en.wikipedia.org/wiki/RSA_(cryptosystem)
.. _`Chinese remainder theorem`: https://en.wikipedia.org/wiki/Chinese_remainder_theorem