public void RoundTripEncryptNullStringTest() { ICipherAsync target = GetCipher(); string testText = null; var cryptoResult = target.Encrypt(testText); Assert.IsNull(cryptoResult); target = GetCipher(); var textResult = target.DecryptString(cryptoResult); Assert.AreEqual(testText, textResult); }
public void RoundTripEncryptStringTest() { ICipherAsync target = GetCipher(); var testText = "test text"; var cryptoResult = target.Encrypt(testText); Assert.IsNotNull(cryptoResult); Assert.IsTrue(cryptoResult.Length > testText.Length * 2); target = GetCipher(); var textResult = target.DecryptString(cryptoResult); Assert.AreEqual(testText, textResult); }