Skip to content

Fix SHA256 implementation: safer rotate, finalize guard, fread loop, …#3

Open
ayoussief wants to merge 1 commit intoLekKit:masterfrom
ayoussief:fix-sha256
Open

Fix SHA256 implementation: safer rotate, finalize guard, fread loop, …#3
ayoussief wants to merge 1 commit intoLekKit:masterfrom
ayoussief:fix-sha256

Conversation

@ayoussief
Copy link

Fixed infinite loop on read error in hash_file.c.

Replaced rotation macro with inline function to avoid UB.

Added guard in finalize to prevent OOB.

Ensured fclose() is always called.

Verified against NIST test vectors + large input tests.

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.

1 participant