]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-134531: cleanup `_hashopenssl.c` to support `EVP_MAC` (#134626)
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Mon, 26 May 2025 10:12:32 +0000 (12:12 +0200)
committerGitHub <noreply@github.com>
Mon, 26 May 2025 10:12:32 +0000 (10:12 +0000)
commitcb8045e86c4fadfd847d614193f2b38ec03933b8
tree856a57c895c8135dfb39670b6c2032a5114b306f
parent71290a6fbe79cef3773a3af6fcf08d8bf15c8460
gh-134531: cleanup `_hashopenssl.c` to support `EVP_MAC` (#134626)

Rename components related to `_hashlib.{HASH,HASHXOF}` objects.

- The `EVPobject` structure is renamed `HASHobject`.
- Non-clinic `HASH` methods are now prefixed by `_hashlib_HASH_*`.
  A similar change is made for non-clinic `HASHXOF` methods.
- Functions extracting information from `EVP_MD` objects and functions
  constructing `EVP_MD` objects now include `openssl_evp_md` in their name.

This change allows us to avoid future ambiguities between the `EVP_MD`
and the `EVP_MAC` APIs (currently, we only use `EVP_MD` for hash functions
and rely on the legacy interface for HMAC instead of using `EVP_MAC`).
Misc/NEWS.d/next/Library/2025-05-26-11-01-54.gh-issue-134531.my1Fzt.rst [new file with mode: 0644]
Modules/_hashopenssl.c
Modules/clinic/_hashopenssl.c.h