Skip to content

Commit df36d7d

Browse files
authored
Update Lib/hmac.py
1 parent f93e1ba commit df36d7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/hmac.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def digest(key, msg, digest):
242242
try:
243243
return _hashopenssl.hmac_digest(key, msg, digest)
244244
except OverflowError as exc:
245-
if not isinstance(digest, str):
245+
if _hmac is None or not isinstance(digest, str):
246246
# Without re-raising now, slow HMAC will be used as
247247
# HACL* HMAC only identifies digests by their name.
248248
raise exc

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy