public void PositivePBKDF1CompareTest() { string password = "******"; PasswordHashing provider = new PasswordHashing(algorithm: PasswordHashing.ALGORITHM.PBKDF1); string hash = provider.Compute(password); bool result = provider.Compare(password, hash); Assert.IsTrue(result); }
public void PositiveCompareTest() { string password = "******"; PasswordHashing provider = new PasswordHashing(); string hash = provider.Compute(password); bool result = provider.Compare(password, hash); Assert.IsTrue(result); }
public void NegativeCompareTest() { string password = "******"; string wrongPassword = "******"; PasswordHashing provider = new PasswordHashing(); string hash = provider.Compute(password); bool result = provider.Compare(wrongPassword, hash); Assert.IsFalse(result); }