Skip to content

Conversation

@BowTiedWoo
Copy link
Contributor

This PR refactors the memory management for hashing functions (sha256, sha512, and hash160) by introducing a dedicated workspace for each function.

Instead of allocating memory every time a hash is computed, each function now allocates its workspace once during initialization. The memory location for each workspace is stored and reused, improving performance and reducing allocation overhead.

Closes: #645

@BowTiedWoo BowTiedWoo requested a review from Acaccia May 13, 2025 22:00
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent Stack Overlaps in Hashing Functions via Persistent Workspaces

3 participants