aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2013-10-31 13:37:24 -0700
committerDavid Reid <dreid@dreid.org>2013-10-31 13:37:24 -0700
commit30b161375b168d7e32c27651f1906232b44909f8 (patch)
treebde980c7aab04a433113d0ebcb8f8f5321be80c7 /docs/hazmat
parentfba0cd7a3a9b90909545326fad4e370ba4e1f320 (diff)
downloadcryptography-30b161375b168d7e32c27651f1906232b44909f8.tar.gz
cryptography-30b161375b168d7e32c27651f1906232b44909f8.tar.bz2
cryptography-30b161375b168d7e32c27651f1906232b44909f8.zip
Update documentation
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/primitives/cryptographic-hashes.rst13
1 files changed, 5 insertions, 8 deletions
diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst
index c780dcb0..9bbac247 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:: BaseHash(data=None)
+.. class:: Hash(algorithm)
Abstract base class that implements a common interface for all hash
algorithms that follow here.
@@ -15,11 +15,11 @@ Message Digests
.. doctest::
>>> from cryptography.hazmat.primitives import hashes
- >>> digest = hashes.SHA256()
+ >>> digest = hashes.Hash(hashes.SHA256())
>>> digest.update(b"abc")
>>> digest.update(b"123")
- >>> digest.hexdigest()
- '6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090'
+ >>> digest.finalize()
+ 'l\xa1=R\xcap\xc8\x83\xe0\xf0\xbb\x10\x1eBZ\x89\xe8bM\xe5\x1d\xb2\xd29%\x93\xafj\x84\x11\x80\x90'
.. method:: update(data)
@@ -29,13 +29,10 @@ Message Digests
:return: a new instance of this object with a copied internal state.
- .. method:: digest()
+ .. method:: finalize()
:return bytes: The message digest as bytes.
- .. method:: hexdigest()
-
- :return str: The message digest as hex.
SHA-1
~~~~~