From fc10a7587b1a642748ae0fd69f08d92b4a902248 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 12 Apr 2017 16:57:48 +0200 Subject: lib, ipcpd, irmd: Register hash instead of name All information passed over the IRMd/IPCP boundary for using IPC services (flow allocation, registration) is now hashed. This effectively fixes the shared namespace between DIFs and the IRMDs. This PR also fixes some API issues (adding const identifiers), shuffles the include headers a bit and some small bugs. --- src/lib/sha3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/sha3.c') 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 +#include #include #include -#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); -- cgit v1.2.3