Skip to content

Commit 3cb1097

Browse files
authored
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.
1 parent 83b94e8 commit 3cb1097

File tree

3 files changed

+364
-368
lines changed

3 files changed

+364
-368
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Rewrite and cleanup the internal :mod:`!_blake2` module. Some exception
2+
messages were changed but their types were left untouched. Patch by Bénédikt
3+
Tran.

0 commit comments

Comments
 (0)