From 00eff9ca7fece942670429824cb77dd532190c96 Mon Sep 17 00:00:00 2001 From: Ayrx Date: Sat, 17 May 2014 19:47:09 +0800 Subject: Simplified exception message --- docs/hazmat/primitives/mac/cmac.rst | 9 +++------ docs/hazmat/primitives/mac/hmac.rst | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'docs/hazmat/primitives/mac') diff --git a/docs/hazmat/primitives/mac/cmac.rst b/docs/hazmat/primitives/mac/cmac.rst index 86c3b6a9..23b1fea2 100644 --- a/docs/hazmat/primitives/mac/cmac.rst +++ b/docs/hazmat/primitives/mac/cmac.rst @@ -68,9 +68,7 @@ A subset of CMAC with the AES-128 algorithm is described in :rfc:`4493`. :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 @@ A subset of CMAC with the AES-128 algorithm is described in :rfc:`4493`. :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 0fc4a19a..d56927b9 100644 --- a/docs/hazmat/primitives/mac/hmac.rst +++ b/docs/hazmat/primitives/mac/hmac.rst @@ -69,9 +69,7 @@ of a message. :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 @@ of a message. :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() -- cgit v1.2.3