Hash memcpy#762
Open
MarekKnapek wants to merge 3 commits into
Open
Conversation
92c2b3a to
3585d9a
Compare
karel-m
reviewed
May 20, 2026
|
|
||
| /* copy output */ | ||
| for (i = 0; i < 8; i++) { | ||
| STORE32H(md->sha256.state[i], out+(4*i)); |
Member
There was a problem hiding this comment.
this needs to be changed to:
STORE32H(state[i], out+(4*i));
Contributor
Author
There was a problem hiding this comment.
Wow, this should not even compile as I removed the state pointer from the struct. It is redundant now, because it could be computed at any time by using the byte buffer and align variable.
Anyway, there is already better PR on its way. It uses a byte data type to track the align offset instead of int. It might be better. This PR is for scrap.
BUT the state pointer remains in that PR. Should it? If it is possible to compute it at any time? Isn't it redundant now?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Fixes:tag to the commit message