forked from Telodendria/Telodendria
Merge branch 'master' of https://git.telodendria.io/Telodendria/Telodendria into roomwerk
This commit is contained in:
commit
0a45cebbfe
1 changed files with 2 additions and 2 deletions
|
@ -411,7 +411,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);
|
||||
|
||||
|
@ -442,7 +442,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)));
|
||||
|
|
Loading…
Reference in a new issue