Skip to content
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
2 changes: 1 addition & 1 deletion python-stdlib/hmac/hmac.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, key, msg=None, digestmod=None):
make_hash = digestmod # A
elif isinstance(digestmod, str):
# A hash name suitable for hashlib.new().
make_hash = lambda d=b"": hashlib.new(digestmod, d) # B
make_hash = lambda d=b"": getattr(hashlib, digestmod)(d)
else:
# A module supporting PEP 247.
make_hash = digestmod.new # C
Expand Down
2 changes: 1 addition & 1 deletion python-stdlib/hmac/manifest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
metadata(version="3.4.3")
metadata(version="3.4.4")

module("hmac.py")
2 changes: 1 addition & 1 deletion python-stdlib/hmac/test_hmac.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

msg = b"zlutoucky kun upel dabelske ody"

dig = hmac.new(b"1234567890", msg=msg, digestmod=hashlib.sha256).hexdigest()
dig = hmac.new(b"1234567890", msg=msg, digestmod="sha256").hexdigest()

print("c735e751e36b08fb01e25794bdb15e7289b82aecdb652c8f4f72f307b39dad39")
print(dig)
Expand Down