diff options
author | Ayrx <terrycwk1994@gmail.com> | 2014-05-17 16:59:31 +0800 |
---|---|---|
committer | Ayrx <terrycwk1994@gmail.com> | 2014-05-17 16:59:31 +0800 |
commit | 6d69eab6caff7b87d32fab3c7178296e481eb8a4 (patch) | |
tree | b421709339ac20068fba14dc64cc062031b9ed1f /docs/hazmat/primitives/mac | |
parent | 60437c370d079d55db2c284e2f241ecde3b61cbf (diff) | |
download | cryptography-6d69eab6caff7b87d32fab3c7178296e481eb8a4.tar.gz cryptography-6d69eab6caff7b87d32fab3c7178296e481eb8a4.tar.bz2 cryptography-6d69eab6caff7b87d32fab3c7178296e481eb8a4.zip |
Fixed TypeError and added documentation
Diffstat (limited to 'docs/hazmat/primitives/mac')
-rw-r--r-- | docs/hazmat/primitives/mac/cmac.rst | 6 | ||||
-rw-r--r-- | docs/hazmat/primitives/mac/hmac.rst | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/mac/cmac.rst b/docs/hazmat/primitives/mac/cmac.rst index 1fde1398..86c3b6a9 100644 --- a/docs/hazmat/primitives/mac/cmac.rst +++ b/docs/hazmat/primitives/mac/cmac.rst @@ -68,6 +68,9 @@ 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. .. method:: copy() @@ -89,6 +92,9 @@ 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. .. method:: finalize() diff --git a/docs/hazmat/primitives/mac/hmac.rst b/docs/hazmat/primitives/mac/hmac.rst index e20a4034..0fc4a19a 100644 --- a/docs/hazmat/primitives/mac/hmac.rst +++ b/docs/hazmat/primitives/mac/hmac.rst @@ -69,6 +69,9 @@ 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. .. method:: copy() @@ -90,6 +93,9 @@ 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. .. method:: finalize() |