aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorAyrx <terrycwk1994@gmail.com>2014-04-15 19:02:51 +0800
committerAyrx <terrycwk1994@gmail.com>2014-04-15 19:02:51 +0800
commit97a72fd82819ab9d276c9a6e07c54446ebc2c591 (patch)
treec23a0e7d34f46e891a7375e379787e6ed3fa95c9 /docs/hazmat
parentc81217024fe2dcd0ea4eba696229ec029cd533e3 (diff)
downloadcryptography-97a72fd82819ab9d276c9a6e07c54446ebc2c591.tar.gz
cryptography-97a72fd82819ab9d276c9a6e07c54446ebc2c591.tar.bz2
cryptography-97a72fd82819ab9d276c9a6e07c54446ebc2c591.zip
Added CMAC backend interface documentation
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/backends/interfaces.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 9c401d28..546aa766 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -319,3 +319,27 @@ A specific ``backend`` may provide one or more of these interfaces.
:raises ValueError: This is raised if the key size is not (1024 or 2048 or 3072)
or if the OpenSSL version is older than 1.0.0 and the key size is larger than 1024
because older OpenSSL versions don't support a key size larger than 1024.
+
+
+.. class:: CMACBackend
+
+ .. versionadded:: 0.4
+
+ A backend with methods for using CMAC
+
+ .. method:: cmac_supported()
+
+ :return: True if CMAC is supported by the backend. False if otherwise.
+
+ .. method:: create_cmac_ctx(algorithm)
+
+ Create a
+ :class:`~cryptography.hazmat.primitives.interfaces.CMACContext` that
+ uses the specified ``algorithm`` to calculate a message authentication code.
+
+ :param algorithm: An instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.BlockCipherAlgorithm`
+ provider.
+
+ :returns:
+ :class:`~cryptography.hazmat.primitives.interfaces.CMACContext`