aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/cryptographic-hashes.rst
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2013-11-06 11:12:45 -0800
committerDavid Reid <dreid@dreid.org>2013-11-20 09:50:18 -0800
commitef0fcf26c920c011948f078481739f4e2c31535f (patch)
tree24fa4b4603d77f24b6052fac5ce3b9337a685871 /docs/hazmat/primitives/cryptographic-hashes.rst
parent077e76e697ebf25aa9fd757f0ef1fd1251b7d408 (diff)
downloadcryptography-ef0fcf26c920c011948f078481739f4e2c31535f.tar.gz
cryptography-ef0fcf26c920c011948f078481739f4e2c31535f.tar.bz2
cryptography-ef0fcf26c920c011948f078481739f4e2c31535f.zip
Add a default_backend and start updating docs.
Diffstat (limited to 'docs/hazmat/primitives/cryptographic-hashes.rst')
-rw-r--r--docs/hazmat/primitives/cryptographic-hashes.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst
index 52e87702..b3db9f19 100644
--- a/docs/hazmat/primitives/cryptographic-hashes.rst
+++ b/docs/hazmat/primitives/cryptographic-hashes.rst
@@ -5,7 +5,7 @@ Message Digests
.. currentmodule:: cryptography.hazmat.primitives.hashes
-.. class:: Hash(algorithm)
+.. class:: Hash(algorithm, backend)
A cryptographic hash function takes an arbitrary block of data and
calculates a fixed-size bit string (a digest), such that different data
@@ -19,9 +19,9 @@ Message Digests
various message digests.
.. doctest::
-
+ >>> from cryptography.hazmat.bindings import default_backend
>>> from cryptography.hazmat.primitives import hashes
- >>> digest = hashes.Hash(hashes.SHA256())
+ >>> digest = hashes.Hash(hashes.SHA256(), default_backend())
>>> digest.update(b"abc")
>>> digest.update(b"123")
>>> digest.finalize()