diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-04-27 10:04:21 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-04-27 10:04:21 -0700 |
commit | e3aa9f8cb8d81416f4a7b229a3fe149e2ff75d28 (patch) | |
tree | bf03819bbb6ca4c20445bdd4a57e4c007a59d0d6 /docs | |
parent | db1524b8db4959f25c880f871ea0d2ddb137ec58 (diff) | |
parent | c6f195607ecce2419e477f44de4248b4e61212df (diff) | |
download | cryptography-e3aa9f8cb8d81416f4a7b229a3fe149e2ff75d28.tar.gz cryptography-e3aa9f8cb8d81416f4a7b229a3fe149e2ff75d28.tar.bz2 cryptography-e3aa9f8cb8d81416f4a7b229a3fe149e2ff75d28.zip |
Merge pull request #974 from reaperhulk/padding-docs
document exceptions for padding
Diffstat (limited to 'docs')
-rw-r--r-- | docs/hazmat/primitives/padding.rst | 4 |
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. |