mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Issue #18582: Add 'pbkdf2_hmac' to the hashlib module.
This commit is contained in:
parent
3892419a7a
commit
e92ef13b0a
6 changed files with 280 additions and 0 deletions
|
@ -147,6 +147,14 @@ except ImportError:
|
|||
new = __py_new
|
||||
__get_hash = __get_builtin_constructor
|
||||
|
||||
# PBKDF2 requires OpenSSL 1.0+ with HMAC and SHA
|
||||
try:
|
||||
from _hashlib import pbkdf2_hmac
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
__all__ += ('pbkdf2_hmac',)
|
||||
|
||||
for __func_name in __always_supported:
|
||||
# try them all, some may not work due to the OpenSSL
|
||||
# version not supporting that algorithm.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue