]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-136547: fix `hashlib_helper` for blocking and requesting digests (#136762)
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sun, 20 Jul 2025 12:32:35 +0000 (14:32 +0200)
committerGitHub <noreply@github.com>
Sun, 20 Jul 2025 12:32:35 +0000 (14:32 +0200)
commitc504f62fe2ebd86c93fb001b62478e0e3249fb6c
tree7af7acfe7530121672605b4e0857e8915bbd2b82
parentcc81b4e501138b5793d419c81c3a2859a17207a7
gh-136547: fix `hashlib_helper` for blocking and requesting digests (#136762)

- Fix `hashlib_helper.block_algorithm` where the dummy functions were incorrectly defined.
- Rename `hashlib_helper.HashAPI` to `hashlib_helper.HashInfo` and add more helper methods.
- Simplify `hashlib_helper.requires_*()` functions.
- Rewrite some private helpers in `hashlib_helper`.
- Remove `find_{builtin,openssl}_hashdigest_constructor()` as they are no more needed and were
  not meant to be public in the first place.
- Fix some tests in `test_hashlib` when FIPS mode is on.
Lib/hashlib.py
Lib/test/support/hashlib_helper.py
Lib/test/test_hashlib.py
Lib/test/test_support.py