Skip to content

Commit 9f44ea2

Browse files
committed
bpo-38132: Clarify is always lower case
1 parent 9bf9488 commit 9f44ea2

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_hashlib.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ def test_unknown_hash(self):
194194
self.assertRaises(ValueError, hashlib.new, 'spam spam spam spam spam')
195195
self.assertRaises(TypeError, hashlib.new, 1)
196196

197+
def test_new_upper_to_lower(self):
198+
self.assertEqual(hashlib.new("SHA256").name, "sha256")
199+
197200
def test_get_builtin_constructor(self):
198201
get_builtin_constructor = getattr(hashlib,
199202
'__get_builtin_constructor')
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
The OpenSSL hashlib wrapper uses a simpler implementation. Several Macros
22
and pointless caches are gone. The hash name now comes from OpenSSL's EVP.
3+
The algorithm name stays the same, except it is now always lower case.

0 commit comments

Comments
 (0)