aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.rst1
-rw-r--r--docs/hazmat/primitives/cryptographic-hashes.rst16
-rw-r--r--src/cryptography/hazmat/primitives/hashes.py16
3 files changed, 17 insertions, 16 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index a1fdea7e..822a8c8a 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -27,6 +27,7 @@ Changelog
extensions only need to be rejected on certificate verification.
* The CommonCrypto backend has been removed.
* MultiBackend has been removed.
+* ``Whirlpool`` and ``RIPEMD160`` have been deprecated.
1.8.1 - 2017-03-10
diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst
index d3e9eb4d..55af21ac 100644
--- a/docs/hazmat/primitives/cryptographic-hashes.rst
+++ b/docs/hazmat/primitives/cryptographic-hashes.rst
@@ -150,22 +150,6 @@ SHA-1
vulnerable to practical collision attacks, and collisions have been
demonstrated.
-RIPEMD160
-~~~~~~~~~
-
-.. class:: RIPEMD160()
-
- RIPEMD160 is a cryptographic hash function that is part of ISO/IEC
- 10118-3:2004. It produces a 160-bit message digest.
-
-Whirlpool
-~~~~~~~~~
-
-.. class:: Whirlpool()
-
- Whirlpool is a cryptographic hash function that is part of ISO/IEC
- 10118-3:2004. It produces a 512-bit message digest.
-
MD5
~~~
diff --git a/src/cryptography/hazmat/primitives/hashes.py b/src/cryptography/hazmat/primitives/hashes.py
index 0714c118..e1172d9d 100644
--- a/src/cryptography/hazmat/primitives/hashes.py
+++ b/src/cryptography/hazmat/primitives/hashes.py
@@ -149,6 +149,14 @@ class RIPEMD160(object):
block_size = 64
+RIPEMD160 = utils.deprecated(
+ RIPEMD160,
+ __name__,
+ "The RIPEMD160 hash was deprecated in version 1.9.",
+ utils.DeprecatedIn19
+)
+
+
@utils.register_interface(HashAlgorithm)
class Whirlpool(object):
name = "whirlpool"
@@ -156,6 +164,14 @@ class Whirlpool(object):
block_size = 64
+Whirlpool = utils.deprecated(
+ Whirlpool,
+ __name__,
+ "The Whirlpool hash was deprecated in version 1.9.",
+ utils.DeprecatedIn19
+)
+
+
@utils.register_interface(HashAlgorithm)
class MD5(object):
name = "md5"