aboutsummaryrefslogtreecommitdiff
path: root/src/hash/sha2-256.c
diff options
context:
space:
mode:
authorame <[email protected]>2024-03-08 14:14:39 -0600
committerame <[email protected]>2024-03-08 14:14:39 -0600
commit652146a3a4780ede6cc99ae56871f8f6bb506284 (patch)
tree0aae88a063da581c90b2eec987c77a53dda986ef /src/hash/sha2-256.c
parent935cd9eed5863614dbb2c677c95aee73753e611f (diff)
fixed hashes and net stuff
Diffstat (limited to 'src/hash/sha2-256.c')
-rw-r--r--src/hash/sha2-256.c6
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){