From 39093e9e6836b98dc67979e4e888e4bc639caa07 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 6 Sep 2016 20:22:28 +0200 Subject: Issue #27928: Add scrypt (password-based key derivation function) to hashlib module (requires OpenSSL 1.1.0). --- Lib/hashlib.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Lib/hashlib.py') diff --git a/Lib/hashlib.py b/Lib/hashlib.py index 316cecedc2..348ea14a05 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 -- cgit v1.2.1