summaryrefslogtreecommitdiff
path: root/src/lib/sha3.c
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2017-04-16 09:40:32 +0200
committerdimitri staessens <[email protected]>2017-04-16 09:40:32 +0200
commitffc4468030398955ec56dac17934b43adfeab68b (patch)
tree5586e971b0924d6a888cbe11ff09f68bcba12edb /src/lib/sha3.c
parente543c43c9f911bbe40371e3c6ca5c916cb3365a9 (diff)
downloadouroboros-ffc4468030398955ec56dac17934b43adfeab68b.tar.gz
ouroboros-ffc4468030398955ec56dac17934b43adfeab68b.zip
lib: Fix minor things in sha3 implementation
Diffstat (limited to 'src/lib/sha3.c')
-rw-r--r--src/lib/sha3.c4
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 */