gh-99108: Refactor _sha256 & _sha512 into _sha2. (#101924)

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.
This commit is contained in:
Gregory P. Smith 2023-02-15 22:08:20 -08:00 committed by GitHub
parent 89ac665891
commit 0b13575e74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 1310 additions and 1493 deletions

View file

@ -63,9 +63,8 @@ static const char* _Py_stdlib_module_names[] = {
"_random",
"_scproxy",
"_sha1",
"_sha256",
"_sha2",
"_sha3",
"_sha512",
"_signal",
"_sitebuiltins",
"_socket",