diff options
| author | ame <[email protected]> | 2024-03-08 14:14:39 -0600 |
|---|---|---|
| committer | ame <[email protected]> | 2024-03-08 14:14:39 -0600 |
| commit | 05ae1fc2fef778138bb3a136340dd923ca9687a0 (patch) | |
| tree | 0aae88a063da581c90b2eec987c77a53dda986ef /src/hash/sha2-256.c | |
| parent | 580c39bb8d128b4f66d1c5d87a98ab7fb44a686b (diff) | |
fixed hashes and net stuff
Diffstat (limited to 'src/hash/sha2-256.c')
| -rw-r--r-- | src/hash/sha2-256.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hash/sha2-256.c b/src/hash/sha2-256.c index e343825..d0c03f9 100644 --- a/src/hash/sha2-256.c +++ b/src/hash/sha2-256.c @@ -160,20 +160,20 @@ void sha2_512_t(uint8_t* out, uint8_t* in, int t){ if(t%8!=0) return; uint64_t out_stream[8] = {0}; sha512_gen(out_stream, in, sha_iv_gen(t)); - for(int i = 0; i != 8; i++) sprintf((char*)out, "%s%016lx", out, out_stream[i]); + for(int i = 0; i != 8; i++) sprintf((char*)out, "%s%016llx", out, out_stream[i]); out[t/4] = '\0'; } void sha2_512(uint8_t* out, uint8_t* in){ uint64_t out_stream[8] = {0}; sha512_gen(out_stream, in, sha512_iv); - for(int i = 0; i != 8; i++) sprintf((char*)out, "%s%016lx", out, out_stream[i]); + for(int i = 0; i != 8; i++) sprintf((char*)out, "%s%016llx", out, out_stream[i]); } void sha2_384(uint8_t* out, uint8_t* in){ uint64_t out_stream[8] = {0}; sha512_gen(out_stream, in, sha384_iv); - for(int i = 0; i != 6; i++) sprintf((char*)out, "%s%016lx", out, out_stream[i]); + for(int i = 0; i != 6; i++) sprintf((char*)out, "%s%016llx", out, out_stream[i]); } int l_sha512(lua_State* L){ |
