From 05ae1fc2fef778138bb3a136340dd923ca9687a0 Mon Sep 17 00:00:00 2001 From: ame Date: Fri, 8 Mar 2024 14:14:39 -0600 Subject: fixed hashes and net stuff --- src/hash/sha2-256.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/hash/sha2-256.c') 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){ -- cgit v1.2.3