aboutsummaryrefslogtreecommitdiff
path: root/src/hash/blake.c
diff options
context:
space:
mode:
authorame <[email protected]>2024-08-26 16:13:19 -0500
committerame <[email protected]>2024-08-26 16:13:25 -0500
commit7a15e796e8789b51a459af7fe890e02a416e1fc7 (patch)
tree5d6e80abc948ba0034d3b4f32bba6746d95735e5 /src/hash/blake.c
parent064376146afad7af0b496014c59ba4b4f78d4c78 (diff)
use integer format macros
Diffstat (limited to 'src/hash/blake.c')
-rw-r--r--src/hash/blake.c7
1 files changed, 3 insertions, 4 deletions
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 <stdio.h>
#include <stdint.h>
#include <stdlib.h>
-#include <math.h>
#include <stdlib.h>
+#include <inttypes.h>
#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);