aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/padding.rst
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-26 09:00:11 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-26 09:00:11 -0500
commitb30402c6b5ad6aa3625fcfbd9e7cb7998670d2f4 (patch)
tree4edb3415ec207040348d3436f34e40073cd18a28 /docs/hazmat/primitives/padding.rst
parente6e1b417fd09d0b1f4ff6e54019fe7bebc0ec25c (diff)
parent425fc045205c1e38ace3c79e501805d63aa2465c (diff)
downloadcryptography-b30402c6b5ad6aa3625fcfbd9e7cb7998670d2f4.tar.gz
cryptography-b30402c6b5ad6aa3625fcfbd9e7cb7998670d2f4.tar.bz2
cryptography-b30402c6b5ad6aa3625fcfbd9e7cb7998670d2f4.zip
Merge pull request #972 from public/padding-docs
Use AlreadyFinalized instead of ValueError
Diffstat (limited to 'docs/hazmat/primitives/padding.rst')
-rw-r--r--docs/hazmat/primitives/padding.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/padding.rst b/docs/hazmat/primitives/padding.rst
index c0209446..3056eb92 100644
--- a/docs/hazmat/primitives/padding.rst
+++ b/docs/hazmat/primitives/padding.rst
@@ -66,7 +66,16 @@ multiple of the block size.
:param bytes data: The data you wish to pass into the context.
:return bytes: Returns the data that was padded or unpadded.
+ :raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize`.
.. method:: finalize()
+ Finalize the current context and return the rest of the data.
+
+ After ``finalize`` has been called this object can no longer be used;
+ :meth:`update` and :meth:`finalize` will raise an
+ :class:`~cryptography.exceptions.AlreadyFinalized` exception.
+
:return bytes: Returns the remainder of the data.
+ :raises ValueError: When trying to remove padding from incorrectly
+ padded data.