mirror of
https://github.com/python/cpython.git
synced 2025-10-26 19:24:34 +00:00
gh-90733: improve hashlib.scrypt interface (#136100)
* add `scrypt` to `hashlib.__all__` * improve `hashlib.scrypt` exception messages
This commit is contained in:
parent
75e2c5dd34
commit
a68ddea3bf
5 changed files with 120 additions and 88 deletions
|
|
@ -187,7 +187,8 @@ def __hash_new(name, *args, **kwargs):
|
|||
|
||||
try:
|
||||
# OpenSSL's scrypt requires OpenSSL 1.1+
|
||||
from _hashlib import scrypt # noqa: F401
|
||||
from _hashlib import scrypt
|
||||
__all__ += ('scrypt',)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue