Skip to content

[3.8] bpo-38132: Simplify _hashopenssl code (GH-16023) #16040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Lib/test/test_hashlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ def test_unknown_hash(self):
self.assertRaises(ValueError, hashlib.new, 'spam spam spam spam spam')
self.assertRaises(TypeError, hashlib.new, 1)

def test_new_upper_to_lower(self):
self.assertEqual(hashlib.new("SHA256").name, "sha256")

def test_get_builtin_constructor(self):
get_builtin_constructor = getattr(hashlib,
'__get_builtin_constructor')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The OpenSSL hashlib wrapper uses a simpler implementation. Several Macros
and pointless caches are gone. The hash name now comes from OpenSSL's EVP.
The algorithm name stays the same, except it is now always lower case.
Loading