diff options
author | dimitri staessens <[email protected]> | 2017-04-16 11:46:34 +0000 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-04-16 11:46:34 +0000 |
commit | 5cbeb1586b7a5a0d5975ee7dc0cd6a2d471b940a (patch) | |
tree | 70abff35ecf47035630d2d3af29600bd6146bd5b /src/lib/sha3.c | |
parent | 9c6750d70b591af5429fcafbad19aede69e21675 (diff) | |
parent | 97ef24340da7d3f55a39ba16b400d13f9bbe9e60 (diff) | |
download | ouroboros-5cbeb1586b7a5a0d5975ee7dc0cd6a2d471b940a.tar.gz ouroboros-5cbeb1586b7a5a0d5975ee7dc0cd6a2d471b940a.zip |
Merged in dstaesse/ouroboros/be-hashing (pull request #484)
Be hashing
Diffstat (limited to 'src/lib/sha3.c')
-rw-r--r-- | src/lib/sha3.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/sha3.c b/src/lib/sha3.c index f80cc4bd..2c8a4614 100644 --- a/src/lib/sha3.c +++ b/src/lib/sha3.c @@ -268,7 +268,9 @@ void rhash_sha3_update(struct sha3_ctx * ctx, size_t block_size = (size_t) ctx->block_size; uint8_t * msg = (uint8_t *) pmsg; - if (ctx->rest & SHA3_FINALIZED) return; + if (ctx->rest & SHA3_FINALIZED) + return; + ctx->rest = (unsigned) ((ctx->rest + size) % block_size); /* fill partial block */ |