public void Should_Properly_Hash_Password() { var crypto = new CryptoHelpers45(); const string password = "******"; var hashedPasswordResult = crypto.PasswordHashing.HashPassword(password); Assert.IsTrue(hashedPasswordResult.IsSuccessful); Assert.IsTrue(!string.IsNullOrWhiteSpace(hashedPasswordResult.Value.HashedPassword)); }
public void Comparing_Passwords_Should_Result_In_Equality() { var crypto = new CryptoHelpers45(); const string originalPassword = "******"; var hashedPasswordResult = crypto.PasswordHashing.HashPassword(originalPassword); const string comparePassword = "******"; var comparePasswordResult = crypto.PasswordHashing.ComparePasswords(comparePassword, hashedPasswordResult.Value); Assert.IsTrue(comparePasswordResult.IsSuccessful); }