gh-90733: improve hashlib.scrypt interface (#136100)

* add `scrypt` to `hashlib.__all__`
* improve `hashlib.scrypt` exception messages
This commit is contained in:
Bénédikt Tran 2025-07-14 12:49:34 +02:00 committed by GitHub
parent 75e2c5dd34
commit a68ddea3bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 120 additions and 88 deletions

View file

@ -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