From 1e544a492723869882aa8737a79ca7bb1b100a02 Mon Sep 17 00:00:00 2001 From: LDA Date: Sun, 25 Aug 2024 21:47:44 +0200 Subject: [PATCH] [MOD] Use hashtypes --- src/User.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/User.c b/src/User.c index 3a38d34..2fdf751 100644 --- a/src/User.c +++ b/src/User.c @@ -384,7 +384,7 @@ UserCheckPassword(User * user, char *password) tmp = StrConcat(2, password, salt); hashBytes = Sha256(tmp); - hashedPwd = ShaToHex(hashBytes); + hashedPwd = ShaToHex(hashBytes, HASH_SHA256); Free(tmp); Free(hashBytes); @@ -415,7 +415,7 @@ UserSetPassword(User * user, char *password) salt = StrRandom(16); tmpstr = StrConcat(2, password, salt); hashBytes = Sha256(tmpstr); - hash = ShaToHex(hashBytes); + hash = ShaToHex(hashBytes, HASH_SHA256); JsonValueFree(HashMapSet(json, "salt", JsonValueString(salt))); JsonValueFree(HashMapSet(json, "password", JsonValueString(hash)));