static void Main(string[] args) { string hashedPassword = HashWithSlat.GenerateHash("1"); //string hashedPassword = HashWithSlat.GenerateHash("P@ssw0rd"); var result = HashWithSlat.VerifyHashedPassword(hashedPassword, "P@ssw0rd"); Console.WriteLine(result); }
public bool Verification(string userID, string password) { string passwordHash = GetByPasswordHash(userID); if (!string.IsNullOrEmpty(passwordHash)) { var result = HashWithSlat.VerifyHashedPassword(passwordHash, password); if (result == PasswordVerificationResult.Success) { return(true); } else { return(false); } } else { return(false); } }