コード例 #1
0
 /// <summary>
 /// Returns true if the supplied password parameter is the same string that was used to create this password.
 /// In other words if the user should succeed in logging in using that password.
 /// </summary>
 public bool IsCorrectPassword(string password)
 {
     return(HashedPassword.SequenceEqual(PasswordHasher.HashPassword(Salt, password)));
     //Use a private nested class to keep this class short and readable while keeping the hashing logic private.
 }