aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/cryptographic-hashes.rst
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-10-27 16:44:30 -0400
committerDonald Stufft <donald@stufft.io>2013-10-28 08:37:33 -0400
commitf04317ae24441082279ea73ccca0a6630c33cc86 (patch)
treeb466055f23bd0ac01776202c0cde70bf7128e863 /docs/hazmat/primitives/cryptographic-hashes.rst
parent01fbdf74967f8e22e3ea2d15f195898c64d34cc3 (diff)
downloadcryptography-f04317ae24441082279ea73ccca0a6630c33cc86.tar.gz
cryptography-f04317ae24441082279ea73ccca0a6630c33cc86.tar.bz2
cryptography-f04317ae24441082279ea73ccca0a6630c33cc86.zip
Move primtives into a hazmat package
Diffstat (limited to 'docs/hazmat/primitives/cryptographic-hashes.rst')
-rw-r--r--docs/hazmat/primitives/cryptographic-hashes.rst92
1 files changed, 92 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst
new file mode 100644
index 00000000..05004080
--- /dev/null
+++ b/docs/hazmat/primitives/cryptographic-hashes.rst
@@ -0,0 +1,92 @@
+Message Digests
+===============
+
+.. currentmodule:: cryptography.hazmat.primitives.hashes
+
+.. class:: BaseHash(data=None)
+
+ Abstract base class that implements a common interface for all hash
+ algorithms that follow here.
+
+ If ``data`` is provided ``update(data)`` is called upon construction.
+
+ .. method:: update(data)
+
+ :param bytes data: The bytes you wish to hash.
+
+ .. method:: copy()
+
+ :return: a new instance of this object with a copied internal state.
+
+ .. method:: digest()
+
+ :return bytes: The message digest as bytes.
+
+ .. method:: hexdigest()
+
+ :return str: The message digest as hex.
+
+SHA-1
+~~~~~
+
+.. attention::
+
+ NIST has deprecated SHA-1 in favor of the SHA-2 variants. New applications
+ are strongly suggested to use SHA-2 over SHA-1.
+
+.. class:: SHA1()
+
+ SHA-1 is a cryptographic hash function standardized by NIST. It has a
+ 160-bit message digest.
+
+SHA-2 Family
+~~~~~~~~~~~~
+
+.. class:: SHA224()
+
+ SHA-224 is a cryptographic hash function from the SHA-2 family and
+ standardized by NIST. It has a 224-bit message digest.
+
+.. class:: SHA256()
+
+ SHA-256 is a cryptographic hash function from the SHA-2 family and
+ standardized by NIST. It has a 256-bit message digest.
+
+.. class:: SHA384()
+
+ SHA-384 is a cryptographic hash function from the SHA-2 family and
+ standardized by NIST. It has a 384-bit message digest.
+
+.. class:: SHA512()
+
+ SHA-512 is a cryptographic hash function from the SHA-2 family and
+ standardized by NIST. It has a 512-bit message digest.
+
+RIPEMD160
+~~~~~~~~~
+
+.. class:: RIPEMD160()
+
+ RIPEMD160 is a cryptographic hash function that is part of ISO/IEC
+ 10118-3:2004. It has a 160-bit message digest.
+
+Whirlpool
+~~~~~~~~~
+
+.. class:: Whirlpool()
+
+ Whirlpool is a cryptographic hash function that is part of ISO/IEC
+ 10118-3:2004. It has a 512-bit message digest.
+
+MD5
+~~~
+
+.. warning::
+
+ MD5 is a deprecated hash algorithm that has practical known collision
+ attacks. You are strongly discouraged from using it.
+
+.. class:: MD5()
+
+ MD5 is a deprecated cryptographic hash function. It has a 128-bit message
+ digest and has practical known collision attacks.