[Python-checkins] bpo-38820: OpenSSL 3.0.0: Use supported hashing algos in doc test (GH-25319)

tiran webhook-mailer at python.org
Fri Apr 9 16:23:20 EDT 2021


https://github.com/python/cpython/commit/2d7fdc90731e132f9d6b43852ee112f25831394b
commit: 2d7fdc90731e132f9d6b43852ee112f25831394b
branch: master
author: Christian Heimes <christian at python.org>
committer: tiran <christian at python.org>
date: 2021-04-09T22:23:10+02:00
summary:

bpo-38820: OpenSSL 3.0.0: Use supported hashing algos in doc test (GH-25319)

ripemd160 is not available in OpenSSL 3.0.0's default crypto provider.
It's only present in legacy provider.

Signed-off-by: Christian Heimes <christian at python.org>

files:
M Doc/library/hashlib.rst

diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst
index 7bb030bd08f9d..6f92152a77827 100644
--- a/Doc/library/hashlib.rst
+++ b/Doc/library/hashlib.rst
@@ -118,10 +118,10 @@ More condensed:
 
 Using :func:`new` with an algorithm provided by OpenSSL:
 
-   >>> h = hashlib.new('ripemd160')
+   >>> h = hashlib.new('sha512_256')
    >>> h.update(b"Nobody inspects the spammish repetition")
    >>> h.hexdigest()
-   'cc4a5ce1b3df48aec5d22d1f16b894a0b894eccc'
+   '19197dc4d03829df858011c6c87600f994a858103bbc19005f20987aa19a97e2'
 
 Hashlib provides the following constant attributes:
 



More information about the Python-checkins mailing list