diff options
| author | ame <[email protected]> | 2024-04-08 10:31:23 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2024-04-08 10:31:23 -0500 |
| commit | 67732c42a3c5d98256674f827af1ac4a17015538 (patch) | |
| tree | 9c2910b38b02f963e751f9b7a12573b3480bb500 /src/hash/sha2-256.c | |
| parent | d3f3a8a1f3e786965ae473c046db2c34d7d3adb6 (diff) | |
sha256 & sha224
Diffstat (limited to 'src/hash/sha2-256.c')
| -rw-r--r-- | src/hash/sha2-256.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/hash/sha2-256.c b/src/hash/sha2-256.c index 5327209..69029bf 100644 --- a/src/hash/sha2-256.c +++ b/src/hash/sha2-256.c @@ -175,14 +175,14 @@ void sha512_final(struct sha512_hash* hash, char* out_stream){ _sha512_t_final(hash); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h0); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h1); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h2); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h3); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h4); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h5); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h6); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h7); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h0); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h1); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h2); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h3); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h4); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h5); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h6); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h7); memcpy(hash, &old_hash, sizeof * hash); memcpy(hash->buffer, old, bs); @@ -196,12 +196,12 @@ void sha384_final(struct sha512_hash* hash, char* out_stream){ _sha512_t_final(hash); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h0); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h1); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h2); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h3); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h4); - sprintf((char*)out_stream, "%s%016lx", out_stream, hash->h5); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h0); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h1); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h2); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h3); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h4); + sprintf((char*)out_stream, "%s%016llx", out_stream, hash->h5); memcpy(hash, &old_hash, sizeof * hash); memcpy(hash->buffer, old, bs); |
