summaryrefslogtreecommitdiffstats
path: root/Modules/sha2module.c
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-99108: Refresh HACL* (GH-104808) (#104893)Miss Islington (bot)2023-05-241-1/+1
| | | | | | | | gh-99108: Refresh HACL* (GH-104808) Refresh HACL* from upstream to improve SHA2 performance and fix a 32-bit issue in SHA3. (cherry picked from commit 160321e5304b962a162eb023472aa2bc8307ae15) Co-authored-by: Jonathan Protzenko <protz@microsoft.com>
* [3.12] gh-99108: Release the GIL around hashlib built-in computation ↵Miss Islington (bot)2023-05-231-6/+88
| | | | | | | | | | | | | | (GH-104675) (#104776) gh-99108: Release the GIL around hashlib built-in computation (GH-104675) This matches the GIL releasing behavior of our existing `_hashopenssl` module, extending it to the HACL* built-ins. Includes adding comments to better describe the ENTER/LEAVE macros purpose and explain the lock strategy in both existing and new code. (cherry picked from commit 2e5d8a90aa633ff0bebc9b2b8e21eea389937b19) Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
* gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205)Eric Snow2023-05-051-0/+1
| | | Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules. We will start checking for it in gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).
* gh-101476: Use _PyType_GetModuleState where applicable (#102188)Erlend E. Aasland2023-02-241-3/+4
|
* gh-99108: Refactor _sha256 & _sha512 into _sha2. (#101924)Gregory P. Smith2023-02-161-0/+805
This merges their code. They're backed by the same single HACL* static library, having them be a single module simplifies maintenance. This should unbreak the wasm enscripten builds that currently fail due to linking in --whole-archive mode and the HACL* library appearing twice. Long unnoticed error fixed: _sha512.SHA384Type was doubly assigned and was actually SHA512Type. Nobody depends on those internal names. Also rename LIBHACL_ make vars to LIBHACL_SHA2_ in preperation for other future HACL things.