Skip to content

Allocate space for hashing functions workspaces #646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

BowTiedWoo
Copy link
Collaborator

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
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
1 participant