gh-135004: rewrite and cleanup blake2module.c (#135006)

* Cleanup imports and update module docstring.
* Simplify detection of SIMD support.
* Correctly guard `update()` cases.
* Rewrite `py_blake2b_or_s_new` and rename it to `py_blake2_new`.
* Rewrite `blake2_blake2b_copy_locked` and `py_blake2_clear`.
* Refactor computations of `digest` and `hexdigest`.
* Simplify `py_blake2b_get_name` and `py_blake2b_get_block_size`.
* Add `hacl_get_blake2_info` to extract static BLAKE-2 information.
   This new helper is used by `py_blake2b_get_digest_size`, but can
   be later used to expose `key_length` more easily.
This commit is contained in:
Bénédikt Tran 2025-06-09 09:17:43 +02:00 committed by GitHub
parent 83b94e856e
commit 3cb109796d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 377 additions and 381 deletions

File diff suppressed because it is too large Load diff