]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38820: OpenSSL 3.0.0: Use supported hashing algos in doc test (GH-25319)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 9 Apr 2021 20:33:29 +0000 (13:33 -0700)
committerGitHub <noreply@github.com>
Fri, 9 Apr 2021 20:33:29 +0000 (13:33 -0700)
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@python.org>
(cherry picked from commit 2d7fdc90731e132f9d6b43852ee112f25831394b)

Co-authored-by: Christian Heimes <christian@python.org>
Doc/library/hashlib.rst

index a16c7cd4d7cd6e9e6a618a6b7bf350c0013e02ff..f5da6ecac2dcf339a84bdbafc5c5ced6c44464d9 100644 (file)
@@ -109,10 +109,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: