aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorTerry Chia <terrycwk1994@gmail.com>2014-10-12 15:35:21 +0800
committerTerry Chia <terrycwk1994@gmail.com>2014-10-20 22:58:48 +0800
commitcc5e44578e040f552bb1b5f94d1b484f0a59bd47 (patch)
treea995f459cca324169507c55ca844ce35c7e244ca /docs
parent9985ff7a63fe6fa087ff14a961833c30da302999 (diff)
downloadcryptography-cc5e44578e040f552bb1b5f94d1b484f0a59bd47.tar.gz
cryptography-cc5e44578e040f552bb1b5f94d1b484f0a59bd47.tar.bz2
cryptography-cc5e44578e040f552bb1b5f94d1b484f0a59bd47.zip
Add docs.
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/primitives/interfaces.rst27
1 files changed, 25 insertions, 2 deletions
diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst
index 2d594c8d..bffd3e2d 100644
--- a/docs/hazmat/primitives/interfaces.rst
+++ b/docs/hazmat/primitives/interfaces.rst
@@ -643,8 +643,8 @@ Key derivation functions
stored derived key.
-`CMAC`_
--------
+`Message Authentication Code`_
+------------------------------
.. class:: CMACContext
@@ -663,6 +663,29 @@ 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()
+
+ :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