public void HashedPasswordIsDifferent() { var hasher = new ArgonPasswordHasher(); var password = "******"; Assert.NotEqual(password, hasher.HashPassword(password)); }
public void VerifyingIncorrectPasswordIsFalse() { var password = "******"; var hasher = new ArgonPasswordHasher(); var hashedPassword = hasher.HashPassword(password); Assert.False(hasher.VerifyPassword(hashedPassword, "SPARTA")); }
public void VerifyingCorrectPasswordIsTrue() { var password = "******"; var hasher = new ArgonPasswordHasher(); var hashedPassword = hasher.HashPassword(password); Assert.True(hasher.VerifyPassword(hashedPassword, password)); }
public void VerifyingPasswordIsCaseSensitive() { var password = "******"; var hasher = new ArgonPasswordHasher(); var hashedPassword = hasher.HashPassword(password); Assert.False(hasher.VerifyPassword(hashedPassword, password.ToLower())); Assert.False(hasher.VerifyPassword(hashedPassword, password.ToUpper())); }