summaryrefslogtreecommitdiff
path: root/src/lib/sha3.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-13 09:55:31 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-04-13 09:55:31 +0000
commit72c28d6173ade511e9dc6969e0fc66db2dbba38a (patch)
tree12756b89d8f4ce421c70d5cf05850b4968e76412 /src/lib/sha3.c
parent2cc9c8d742e037c8a6ddc3eea4c05f4a905183d3 (diff)
parentfc10a7587b1a642748ae0fd69f08d92b4a902248 (diff)
downloadouroboros-72c28d6173ade511e9dc6969e0fc66db2dbba38a.tar.gz
ouroboros-72c28d6173ade511e9dc6969e0fc66db2dbba38a.zip
Merged in dstaesse/ouroboros/be-hashes (pull request #479)
lib, ipcpd, irmd: Register hash instead of name
Diffstat (limited to 'src/lib/sha3.c')
-rw-r--r--src/lib/sha3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/sha3.c b/src/lib/sha3.c
index 750038f2..f80cc4bd 100644
--- a/src/lib/sha3.c
+++ b/src/lib/sha3.c
@@ -44,12 +44,11 @@
*/
#include <ouroboros/endian.h>
+#include <ouroboros/sha3.h>
#include <assert.h>
#include <string.h>
-#include "sha3.h"
-
#define IS_ALIGNED_64(p) (0 == (7 & ((const uint8_t *) (p) \
- (const uint8_t *) 0)))
#define I64(x) x##LL
@@ -262,11 +261,12 @@ static void rhash_sha3_process_block(uint64_t hash[25],
#define SHA3_FINALIZED 0x80000000
void rhash_sha3_update(struct sha3_ctx * ctx,
- const uint8_t * msg,
+ const void * pmsg,
size_t size)
{
size_t idx = (size_t) ctx->rest;
size_t block_size = (size_t) ctx->block_size;
+ uint8_t * msg = (uint8_t *) pmsg;
if (ctx->rest & SHA3_FINALIZED) return;
ctx->rest = (unsigned) ((ctx->rest + size) % block_size);