aboutsummaryrefslogtreecommitdiffstats
path: root/docs/primitives/cryptographic-hashes.rst
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-10-19 20:59:12 -0700
committerDonald Stufft <donald@stufft.io>2013-10-19 20:59:12 -0700
commit7abcb9c0e87787d58f4754c079a3296aaedae657 (patch)
treecef8d5454e951721ed92cd71c5e0b23c7ebc0551 /docs/primitives/cryptographic-hashes.rst
parent1caf8ab5ec72d8373bc9af7a9f7b63c2ac0826f7 (diff)
parent746815b8f2b6a485b41e37c67969ed21338946db (diff)
downloadcryptography-7abcb9c0e87787d58f4754c079a3296aaedae657.tar.gz
cryptography-7abcb9c0e87787d58f4754c079a3296aaedae657.tar.bz2
cryptography-7abcb9c0e87787d58f4754c079a3296aaedae657.zip
Merge pull request #130 from reaperhulk/hash-saga-thrilling-conclusion-md5
Hash Saga Part 7 (MD5 support + docs)
Diffstat (limited to 'docs/primitives/cryptographic-hashes.rst')
-rw-r--r--docs/primitives/cryptographic-hashes.rst88
1 files changed, 88 insertions, 0 deletions
diff --git a/docs/primitives/cryptographic-hashes.rst b/docs/primitives/cryptographic-hashes.rst
new file mode 100644
index 00000000..397e50d7
--- /dev/null
+++ b/docs/primitives/cryptographic-hashes.rst
@@ -0,0 +1,88 @@
+Message Digests
+====================
+
+.. class:: cryptography.primitives.hashes.BaseHash
+
+ Abstract base class that implements a common interface for all hash
+ algorithms that follow here.
+
+ .. 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:: cryptography.primitives.hashes.SHA1()
+
+ SHA-1 is a cryptographic hash function standardized by NIST. It has a
+ 160-bit message digest.
+
+SHA-2 Family
+~~~~~~~~~~~~
+
+.. class:: cryptography.primitives.hashes.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:: cryptography.primitives.hashes.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:: cryptography.primitives.hashes.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:: cryptography.primitives.hashes.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:: cryptography.primitives.hashes.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:: cryptography.primitives.hashes.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:: cryptography.primitives.hashes.MD5()
+
+ MD5 is a deprecated cryptographic hash function. It has a 160-bit message
+ digest and has practical known collision attacks.