Skip to content

Hash memcpy#762

Open
MarekKnapek wants to merge 3 commits into
libtom:developfrom
MarekKnapek:hash-memcpy
Open

Hash memcpy#762
MarekKnapek wants to merge 3 commits into
libtom:developfrom
MarekKnapek:hash-memcpy

Conversation

@MarekKnapek
Copy link
Copy Markdown
Contributor

Checklist

  • documentation is added or updated
  • tests are added or updated
  • if this fixes something: added a Fixes: tag to the commit message


/* copy output */
for (i = 0; i < 8; i++) {
STORE32H(md->sha256.state[i], out+(4*i));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be changed to:

STORE32H(state[i], out+(4*i));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

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.

2 participants