aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/cryptographic-hashes.rst
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2013-11-01 13:34:05 -0700
committerDavid Reid <dreid@dreid.org>2013-11-01 13:34:05 -0700
commit5560298b42f071db0bf7ea46c63ff52603370b38 (patch)
treef2befd7f5183a219f0237f80c1f5d194478c96f1 /docs/hazmat/primitives/cryptographic-hashes.rst
parenta194329365c142a2d2fd62b0a46d8b22eadb676a (diff)
downloadcryptography-5560298b42f071db0bf7ea46c63ff52603370b38.tar.gz
cryptography-5560298b42f071db0bf7ea46c63ff52603370b38.tar.bz2
cryptography-5560298b42f071db0bf7ea46c63ff52603370b38.zip
Improve Hash documentation.
Diffstat (limited to 'docs/hazmat/primitives/cryptographic-hashes.rst')
-rw-r--r--docs/hazmat/primitives/cryptographic-hashes.rst15
1 files changed, 12 insertions, 3 deletions
diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst
index 9bbac247..a939998d 100644
--- a/docs/hazmat/primitives/cryptographic-hashes.rst
+++ b/docs/hazmat/primitives/cryptographic-hashes.rst
@@ -7,10 +7,16 @@ Message Digests
.. class:: Hash(algorithm)
- Abstract base class that implements a common interface for all hash
- algorithms that follow here.
+ A cryptographic hash function takes an arbitrary block of data and
+ calculates a fixed-size bit string (a digest), such that different data
+ results (with a high probability) in different digests.
- If ``data`` is provided ``update(data)`` is called upon construction.
+ This is an implementation of
+ :class:`cryptography.hazmat.primitives.interfaces.HashContext` meant to
+ be used with
+ :class:`cryptography.hazmat.primitives.interfaces.HashAlgorithm`
+ implementations to provide an incremental interface to calculating
+ various message digests.
.. doctest::
@@ -30,6 +36,9 @@ Message Digests
:return: a new instance of this object with a copied internal state.
.. method:: finalize()
+ Finalize the current context and return the message digest as bytes.
+
+ Once ``finalize`` is called this object can no longer be used.
:return bytes: The message digest as bytes.