diff options
| author | ame <[email protected]> | 2024-08-26 16:13:19 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2024-08-26 16:13:25 -0500 |
| commit | fda120441cabfefc511786d7a6af40eec9f181fa (patch) | |
| tree | 5d6e80abc948ba0034d3b4f32bba6746d95735e5 /src/hash/blake.c | |
| parent | 90c4b7dcbc57d2f86a77c997069d96158d54ca55 (diff) | |
use integer format macros
Diffstat (limited to 'src/hash/blake.c')
| -rw-r--r-- | src/hash/blake.c | 7 |
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);
|
