Example #1
0
        public void Test02a(string text)
        {
            var enc = aes2.EncryptString(text);
            var dec = aes2.DecryptString(enc);

            Console.WriteLine(enc);
            Console.WriteLine(dec);
            Assert.AreEqual(text, dec);
            Assert.AreNotEqual(dec, enc);
        }
Example #2
0
        public void Test01a(string text)
        {
            var enc = WebUtility.UrlEncode(aes1.EncryptString(text));
            var dec = aes1.DecryptString((WebUtility.UrlDecode(enc)));

            Console.WriteLine(enc);
            Console.WriteLine(WebUtility.UrlEncode(enc));
            Console.WriteLine(dec);
            Assert.AreEqual(text, dec);
            Assert.AreNotEqual(dec, enc);
        }