Esempio n. 1
0
        public void PasswordInCorrectHashCheck_Test(string originPassword, string inputPassword)
        {
            var pw            = HashProvider.GenerateHash(originPassword);
            var passwordMatch = HashProvider.CompareHash(inputPassword, pw);

            Assert.IsFalse(passwordMatch);
        }
Esempio n. 2
0
        public void PasswordCorrectHashCheck_Test(string password)
        {
            var pw            = HashProvider.GenerateHash(password);
            var passwordMatch = HashProvider.CompareHash(password, pw);

            Assert.IsTrue(passwordMatch);
        }
 public bool CompareHash(Password passwordHash, string plainText)
 {
     return(HashProvider.CompareHash(plainText, passwordHash));
 }