aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/padding.rst
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2014-04-25 22:32:01 +0100
committerAlex Stapleton <alexs@prol.etari.at>2014-04-26 13:17:12 +0100
commit425fc045205c1e38ace3c79e501805d63aa2465c (patch)
tree68d101444a731b57f385f553b9aa4b021e74d3a9 /docs/hazmat/primitives/padding.rst
parent575a7f5f93828c1dd133b420490be2183d71fe9c (diff)
downloadcryptography-425fc045205c1e38ace3c79e501805d63aa2465c.tar.gz
cryptography-425fc045205c1e38ace3c79e501805d63aa2465c.tar.bz2
cryptography-425fc045205c1e38ace3c79e501805d63aa2465c.zip
Update padding docs
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 83154c0d..d23f31bb 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.