Raise padding block_size limit to what is allowed by the specs. (#3108)
* Raize padding block_size limit to what is allowed by the specs.
* Add tests for raising padding limits.
* Amend C code for padding check to use uint16_t instead of uint8_t.
* Fix test to work in Python 3.
* Fix typo.
* Fix another typo.
* Fix return type of the padding checks.
* Change hypothesis test on padding.
* Update comment.
diff --git a/docs/hazmat/primitives/padding.rst b/docs/hazmat/primitives/padding.rst
index d45a5b8..916b9bc 100644
--- a/docs/hazmat/primitives/padding.rst
+++ b/docs/hazmat/primitives/padding.rst
@@ -39,7 +39,7 @@
: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 255 inclusive.
+ between 0 and 2040 inclusive.
.. method:: padder()
@@ -82,7 +82,7 @@
: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 255 inclusive.
+ between 0 and 2040 inclusive.
.. method:: padder()