diff options
author | Christian Heimes <christian@python.org> | 2016-09-06 18:22:28 (GMT) |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2016-09-06 18:22:28 (GMT) |
commit | 39093e9e6836b98dc67979e4e888e4bc639caa07 (patch) | |
tree | c5be5c5ad31e520580ca9f30d019c47cebb66886 /Lib/hashlib.py | |
parent | ac041c0aa721e2672dfb684562b08ad5465b76b1 (diff) | |
download | cpython-39093e9e6836b98dc67979e4e888e4bc639caa07.zip cpython-39093e9e6836b98dc67979e4e888e4bc639caa07.tar.gz cpython-39093e9e6836b98dc67979e4e888e4bc639caa07.tar.bz2 |
Issue #27928: Add scrypt (password-based key derivation function) to hashlib module (requires OpenSSL 1.1.0).
Diffstat (limited to 'Lib/hashlib.py')
-rw-r--r-- | Lib/hashlib.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/hashlib.py b/Lib/hashlib.py index 316cece..348ea14 100644 --- a/Lib/hashlib.py +++ b/Lib/hashlib.py @@ -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 |