aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-11-13 16:38:45 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-11-13 16:38:45 -0800
commit5ef7624d4a61c14b2247903149f4f2675db5b722 (patch)
treeaf6733cbb02f0a17280b6ab115a1c437ae9c8aee /docs/hazmat
parenta502c5009f1fd4a0def66a17f890b6f9c5602bd5 (diff)
parentee66145fc79f1ef2840267718f54fd89463c67f5 (diff)
downloadcryptography-5ef7624d4a61c14b2247903149f4f2675db5b722.tar.gz
cryptography-5ef7624d4a61c14b2247903149f4f2675db5b722.tar.bz2
cryptography-5ef7624d4a61c14b2247903149f4f2675db5b722.zip
Merge pull request #260 from dreid/hmac-already-finalized
Make HMAC methods raise AlreadyFinalized.
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/primitives/hmac.rst14
1 files changed, 12 insertions, 2 deletions
diff --git a/docs/hazmat/primitives/hmac.rst b/docs/hazmat/primitives/hmac.rst
index bd1a4934..cff2dbf1 100644
--- a/docs/hazmat/primitives/hmac.rst
+++ b/docs/hazmat/primitives/hmac.rst
@@ -36,15 +36,25 @@ message.
.. method:: update(msg)
:param bytes msg: The bytes to hash and authenticate.
+ :raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize`
.. method:: copy()
- :return: a new instance of this object with a copied internal state.
+ Copy this :class:`HMAC` instance, usually so that we may call
+ :meth:`finalize` and get an intermediate digest value while we continue
+ to call :meth:`update` on the original.
+
+ :return: A new instance of :class:`HMAC` which can be updated
+ and finalized independently of the original instance.
+ :raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize`
.. method:: finalize()
Finalize the current context and return the message digest as bytes.
- Once ``finalize`` is called this object can no longer be used.
+ Once ``finalize`` is called this object can no longer be used and
+ :meth:`update`, :meth:`copy`, and :meth:`finalize` will raise
+ :class:`~cryptography.exceptions.AlreadyFinalized`.
:return bytes: The message digest as bytes.
+ :raises cryptography.exceptions.AlreadyFinalized: