Skip to content

Rewrite & cleanup HACL*-based extension modules #135532

Open
@picnixz

Description

@picnixz

I recently rewrote the _blake2 module. I want to the same for other modules where I can align the naming of functions across the different modules. The reason why I'm doing this is because it's becoming harder to make "similar" changes everywhere. In general, if I need to change something in MD5, then I also need to change it in SHA1/SHA2/SHA3, and it's easier if the code looks similar elsewhere.

There are some places that need to be updated because they are dead code, e.g.:

/*[clinic input]
module _sha2
class SHA256Type "SHA256object *" "&PyType_Type"
class SHA512Type "SHA512object *" "&PyType_Type"
[clinic start generated code]*/

should be

/*[clinic input]
module _sha2
class SHA256Type "SHA256object *" "clinic_state()->sha256_type"
class SHA512Type "SHA512object *" "clinic_state()->sha512_type"
[clinic start generated code]*/

Linked PRs

Bug fixes (3.14+)

Backported PRs (HMAC-only)

Abandoned

Metadata

Metadata

Assignees

Labels

extension-modulesC modules in the Modules dirtype-refactorCode refactoring (with no changes in behavior)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy