Simplified exception message
diff --git a/docs/hazmat/primitives/constant-time.rst b/docs/hazmat/primitives/constant-time.rst
index 3296dbd..1394b6b 100644
--- a/docs/hazmat/primitives/constant-time.rst
+++ b/docs/hazmat/primitives/constant-time.rst
@@ -36,9 +36,8 @@
:param bytes b: The right-hand side.
:returns bool: ``True`` if ``a`` has the same bytes as ``b``, otherwise
``False``.
- :raises TypeError: This exception is raised if ``a`` or ``b`` is not a
- binary type. This is ``str`` in Python 2 and ``bytes``
- in Python 3.
+ :raises TypeError: This exception is raised if ``a`` or ``b`` is not
+ ``bytes``.
.. _`Coda Hale's blog post`: http://codahale.com/a-lesson-in-timing-attacks/
diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst
index 43dee3f..7e5295c 100644
--- a/docs/hazmat/primitives/cryptographic-hashes.rst
+++ b/docs/hazmat/primitives/cryptographic-hashes.rst
@@ -54,9 +54,7 @@
:param bytes data: The bytes to be hashed.
:raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize`.
- :raises TypeError: This exception is raised if ``data`` is not a binary
- type. This is ``str`` in Python 2 and ``bytes`` in
- Python 3.
+ :raises TypeError: This exception is raised if ``data`` is not ``bytes``.
.. method:: copy()
diff --git a/docs/hazmat/primitives/key-derivation-functions.rst b/docs/hazmat/primitives/key-derivation-functions.rst
index c9c0c3c..f68b12c 100644
--- a/docs/hazmat/primitives/key-derivation-functions.rst
+++ b/docs/hazmat/primitives/key-derivation-functions.rst
@@ -88,9 +88,7 @@
provided ``backend`` does not implement
:class:`~cryptography.hazmat.backends.interfaces.PBKDF2HMACBackend`
- :raises TypeError: This exception is raised if ``salt`` is not a binary
- type. This is ``str`` in Python 2 and ``bytes`` in
- Python 3.
+ :raises TypeError: This exception is raised if ``salt`` is not ``bytes``.
.. method:: derive(key_material)
@@ -104,8 +102,7 @@
once.
:raises TypeError: This exception is raised if ``key_material`` is not
- a binary type. This is ``str`` in Python 2 and
- ``bytes`` in Python 3.
+ ``bytes``.
This generates and returns a new key from the supplied password.
@@ -200,16 +197,14 @@
:class:`~cryptography.hazmat.backends.interfaces.HMACBackend`
:raises TypeError: This exception is raised if ``salt`` or ``info`` is not
- a binary type. This is ``str`` in Python 2 and ``bytes``
- in Python 3.
+ ``bytes``.
.. method:: derive(key_material)
:param bytes key_material: The input key material.
:return bytes: The derived key.
:raises TypeError: This exception is raised if ``key_material`` is not
- a binary type. This is ``str`` in Python 2 and
- ``bytes`` in Python 3.
+ ``bytes``.
Derives a new key from the input key material by performing both the
extract and expand operations.
@@ -292,9 +287,7 @@
provided ``backend`` does not implement
:class:`~cryptography.hazmat.backends.interfaces.HMACBackend`
:raises TypeError: This is raised if the provided ``info`` is a unicode object
- :raises TypeError: This exception is raised if ``info`` is not a binary
- type. This is ``str`` in Python 2 and ``bytes`` in
- Python 3.
+ :raises TypeError: This exception is raised if ``info`` is not ``bytes``.
.. method:: derive(key_material)
@@ -304,8 +297,7 @@
:raises TypeError: This is raised if the provided ``key_material`` is
a unicode object
:raises TypeError: This exception is raised if ``key_material`` is not
- a binary type. This is ``str`` in Python 2 and
- ``bytes`` in Python 3.
+ ``bytes``.
Derives a new key from the input key material by performing both the
extract and expand operations.
diff --git a/docs/hazmat/primitives/mac/cmac.rst b/docs/hazmat/primitives/mac/cmac.rst
index 86c3b6a..23b1fea 100644
--- a/docs/hazmat/primitives/mac/cmac.rst
+++ b/docs/hazmat/primitives/mac/cmac.rst
@@ -68,9 +68,7 @@
:param bytes data: The bytes to hash and authenticate.
:raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize`
- :raises TypeError: This exception is raised if ``data`` is not a binary
- type. This is ``str`` in Python 2 and ``bytes`` in
- Python 3.
+ :raises TypeError: This exception is raised if ``data`` is not ``bytes``.
.. method:: copy()
@@ -92,9 +90,8 @@
:raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize`
:raises cryptography.exceptions.InvalidSignature: If signature does not
match digest
- :raises TypeError: This exception is raised if ``signature`` is not a
- binary type. This is ``str`` in Python 2 and
- ``bytes`` in Python 3.
+ :raises TypeError: This exception is raised if ``signature`` is not
+ ``bytes``.
.. method:: finalize()
diff --git a/docs/hazmat/primitives/mac/hmac.rst b/docs/hazmat/primitives/mac/hmac.rst
index 0fc4a19..d56927b 100644
--- a/docs/hazmat/primitives/mac/hmac.rst
+++ b/docs/hazmat/primitives/mac/hmac.rst
@@ -69,9 +69,7 @@
:param bytes msg: The bytes to hash and authenticate.
:raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize`
- :raises TypeError: This exception is raised if ``msg`` is not a binary
- type. This is ``str`` in Python 2 and ``bytes`` in
- Python 3.
+ :raises TypeError: This exception is raised if ``msg`` is not ``bytes``.
.. method:: copy()
@@ -93,9 +91,8 @@
:raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize`
:raises cryptography.exceptions.InvalidSignature: If signature does not
match digest
- :raises TypeError: This exception is raised if ``signature`` is not a
- binary type. This is ``str`` in Python 2 and
- ``bytes`` in Python 3.
+ :raises TypeError: This exception is raised if ``signature`` is not
+ ``bytes``.
.. method:: finalize()
diff --git a/docs/hazmat/primitives/padding.rst b/docs/hazmat/primitives/padding.rst
index 72378e1..0322f9d 100644
--- a/docs/hazmat/primitives/padding.rst
+++ b/docs/hazmat/primitives/padding.rst
@@ -70,9 +70,7 @@
: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`.
- :raises TypeError: This exception is raised if ``data`` is not a binary
- type. This is ``str`` in Python 2 and ``bytes`` in
- Python 3.
+ :raises TypeError: This exception is raised if ``data`` is not ``bytes``.
.. method:: finalize()