From 7a15e796e8789b51a459af7fe890e02a416e1fc7 Mon Sep 17 00:00:00 2001 From: ame Date: Mon, 26 Aug 2024 16:13:19 -0500 Subject: use integer format macros --- src/hash/blake.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/hash/blake.c') diff --git a/src/hash/blake.c b/src/hash/blake.c index 4c6d284..7bf1481 100644 --- a/src/hash/blake.c +++ b/src/hash/blake.c @@ -2,10 +2,9 @@ #include #include #include -#include #include +#include #include "../crypto.h" -#include "../util.h" const uint8_t blake_sigma[][16] = { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, @@ -438,7 +437,7 @@ void blake512_final(struct blake512_hash* hash, char* out_stream){ _blake512_final(hash, out_stream); for(int i = 0; i != 8; i++){ - sprintf(out_stream + 16 * i, "%016llx", (hash->hash)[i]); + sprintf(out_stream + 16 * i, "%016"PRIx64, (hash->hash)[i]); } memcpy(hash, &old_hash, sizeof * hash); @@ -469,7 +468,7 @@ void blake384_final(struct blake384_hash* hash, char* out_stream){ _blake512_final(hash, out_stream); for(int i = 0; i != 6; i++){ - sprintf(out_stream + 16 * i, "%016llx", (hash->hash)[i]); + sprintf(out_stream + 16 * i, "%016"PRIx64, (hash->hash)[i]); } memcpy(hash, &old_hash, sizeof * hash); -- cgit v1.2.3