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 | 37a4bcc40e52181d9e35663115196534ff2a2442 (patch) | |
| tree | 9c2910b38b02f963e751f9b7a12573b3480bb500 /src/hash/sha2-256.c | |
| parent | 7fbafae25ca81e9acb745fd75ef7f1be55ad7d92 (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); |
