User authentication is functional

This commit is contained in:
kdeng00
2023-09-29 06:44:11 -04:00
parent bc31f033fc
commit 145eea8e92
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -47,6 +47,7 @@ public class PasswordVerification
public string HashPassword(User user, Salt salt, string password = "")
{
var hashAlgorithm = HashAlgorithmName.SHA512;
var dbHashedPassword = user.Password;
if (!string.IsNullOrEmpty(password))
{
@@ -60,6 +61,8 @@ public class PasswordVerification
hashAlgorithm,
this._keySize);
user.Password = dbHashedPassword;
return Convert.ToHexString(hash);
}
#endregion