aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorJulian Krause <julian.krause@gmail.com>2013-12-17 21:26:23 -0800
committerJulian Krause <julian.krause@gmail.com>2013-12-17 21:26:23 -0800
commit2288e30119e2af3e2b448345cf6a9e61f8d06aa0 (patch)
tree9b36ad3394d2d4348c40f40c049815f38378bf0b /docs/hazmat
parenta4aa420cc6c0203d201a0f418af68d1f11abbcf5 (diff)
downloadcryptography-2288e30119e2af3e2b448345cf6a9e61f8d06aa0.tar.gz
cryptography-2288e30119e2af3e2b448345cf6a9e61f8d06aa0.tar.bz2
cryptography-2288e30119e2af3e2b448345cf6a9e61f8d06aa0.zip
Add verify function to hmac and hashes.
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/primitives/cryptographic-hashes.rst7
-rw-r--r--docs/hazmat/primitives/hmac.rst7
2 files changed, 14 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst
index 90ca198a..02c7b5e1 100644
--- a/docs/hazmat/primitives/cryptographic-hashes.rst
+++ b/docs/hazmat/primitives/cryptographic-hashes.rst
@@ -67,6 +67,13 @@ Message Digests
:return bytes: The message digest as bytes.
+ .. method:: verify(sig)
+
+ Finalize the current context and securely compare digest to sig.
+
+ :raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize`
+ :raises cryptography.exceptions.InvalidSignature: If sig does not match digest
+
.. _cryptographic-hash-algorithms:
diff --git a/docs/hazmat/primitives/hmac.rst b/docs/hazmat/primitives/hmac.rst
index 0c0d0220..b556bd6a 100644
--- a/docs/hazmat/primitives/hmac.rst
+++ b/docs/hazmat/primitives/hmac.rst
@@ -69,3 +69,10 @@ message.
:return bytes: The message digest as bytes.
:raises cryptography.exceptions.AlreadyFinalized:
+
+ .. method:: verify(sig)
+
+ Finalize the current context and securely compare digest to sig.
+
+ :raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize`
+ :raises cryptography.exceptions.InvalidSignature: If sig does not match digest