mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #2988
8a4610c3
blake256: fix wrong hash when computed in parts (moneromooo-monero)
This commit is contained in:
commit
529ca39e9d
1 changed files with 1 additions and 1 deletions
|
@ -157,7 +157,7 @@ void blake256_update(state *S, const uint8_t *data, uint64_t datalen) {
|
||||||
int left = S->buflen >> 3;
|
int left = S->buflen >> 3;
|
||||||
int fill = 64 - left;
|
int fill = 64 - left;
|
||||||
|
|
||||||
if (left && (((datalen >> 3) & 0x3F) >= (unsigned) fill)) {
|
if (left && (((datalen >> 3)) >= (unsigned) fill)) {
|
||||||
memcpy((void *) (S->buf + left), (void *) data, fill);
|
memcpy((void *) (S->buf + left), (void *) data, fill);
|
||||||
S->t[0] += 512;
|
S->t[0] += 512;
|
||||||
if (S->t[0] == 0) S->t[1]++;
|
if (S->t[0] == 0) S->t[1]++;
|
||||||
|
|
Loading…
Reference in a new issue