diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-01 08:11:13 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-01 08:11:13 -0800 |
commit | 2a160d6a159817dd9d08a84e77d102e328f9af4f (patch) | |
tree | 461b7c607367f243bb46996ec16ad7424e48d440 /docs/hazmat/primitives/hmac.rst | |
parent | 62aefffb1396190930074bf04c91459d1536bd0e (diff) | |
parent | 522487e5a7dd3004747da85c9f6c53fc5dc4de06 (diff) | |
download | cryptography-2a160d6a159817dd9d08a84e77d102e328f9af4f.tar.gz cryptography-2a160d6a159817dd9d08a84e77d102e328f9af4f.tar.bz2 cryptography-2a160d6a159817dd9d08a84e77d102e328f9af4f.zip |
Merge branch 'master' into validate-iv
Conflicts:
tests/hazmat/backends/test_openssl.py
tests/hazmat/primitives/test_block.py
Diffstat (limited to 'docs/hazmat/primitives/hmac.rst')
-rw-r--r-- | docs/hazmat/primitives/hmac.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/hmac.rst b/docs/hazmat/primitives/hmac.rst index 0c0d0220..b8f94fd2 100644 --- a/docs/hazmat/primitives/hmac.rst +++ b/docs/hazmat/primitives/hmac.rst @@ -34,6 +34,8 @@ message. >>> h.finalize() '#F\xdaI\x8b"e\xc4\xf1\xbb\x9a\x8fc\xff\xf5\xdex.\xbc\xcd/+\x8a\x86\x1d\x84\'\xc3\xa6\x1d\xd8J' + If the backend doesn't support the requested ``algorithm`` an + :class:`~cryptography.exceptions.UnsupportedAlgorithm` will be raised. :param key: Secret key as ``bytes``. :param algorithm: A @@ -69,3 +71,11 @@ message. :return bytes: The message digest as bytes. :raises cryptography.exceptions.AlreadyFinalized: + + .. method:: verify(signature) + + Finalize the current context and securely compare digest to ``signature``. + + :param bytes signature: The bytes of the HMAC signature recieved. + :raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize` + :raises cryptography.exceptions.InvalidSignature: If signature does not match digest |