aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/padding.rst
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-27 09:54:11 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-27 09:54:11 -0500
commitc6f195607ecce2419e477f44de4248b4e61212df (patch)
treebf03819bbb6ca4c20445bdd4a57e4c007a59d0d6 /docs/hazmat/primitives/padding.rst
parentdb1524b8db4959f25c880f871ea0d2ddb137ec58 (diff)
downloadcryptography-c6f195607ecce2419e477f44de4248b4e61212df.tar.gz
cryptography-c6f195607ecce2419e477f44de4248b4e61212df.tar.bz2
cryptography-c6f195607ecce2419e477f44de4248b4e61212df.zip
document exceptions for padding
Diffstat (limited to 'docs/hazmat/primitives/padding.rst')
-rw-r--r--docs/hazmat/primitives/padding.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/padding.rst b/docs/hazmat/primitives/padding.rst
index 3056eb92..4092ac00 100644
--- a/docs/hazmat/primitives/padding.rst
+++ b/docs/hazmat/primitives/padding.rst
@@ -38,6 +38,8 @@ multiple of the block size.
:param block_size: The size of the block in bits that the data is being
padded to.
+ :raises ValueError: Raised if block size is not a multiple of 8 or is not
+ between 0 and 256.
.. method:: padder()
@@ -66,6 +68,7 @@ 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 TypeError: Raised if data is not bytes.
:raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize`.
.. method:: finalize()
@@ -77,5 +80,6 @@ multiple of the block size.
:class:`~cryptography.exceptions.AlreadyFinalized` exception.
:return bytes: Returns the remainder of the data.
+ :raises TypeError: Raised if data is not bytes.
:raises ValueError: When trying to remove padding from incorrectly
padded data.