mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #27928: Add scrypt (password-based key derivation function) to hashlib module (requires OpenSSL 1.1.0).
This commit is contained in:
parent
ac041c0aa7
commit
39093e9e68
6 changed files with 262 additions and 0 deletions
|
@ -202,6 +202,12 @@ except ImportError:
|
|||
|
||||
return dkey[:dklen]
|
||||
|
||||
try:
|
||||
# OpenSSL's scrypt requires OpenSSL 1.1+
|
||||
from _hashlib import scrypt
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
for __func_name in __always_supported:
|
||||
# try them all, some may not work due to the OpenSSL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue