Exemplo n.º 1
0
        public void RoundTripEncryptTextTest()
        {
            ICipherAsync target   = GetCipher();
            var          testText = "test text";

            var cryptoResult = target.EncryptText(testText);

            Assert.IsNotNull(cryptoResult);
            Assert.IsTrue(cryptoResult.Length > testText.Length * 2);

            target = GetCipher();

            var textResult = target.DecryptText(cryptoResult);

            Assert.AreEqual(testText, textResult);
        }