コード例 #1
0
        public void AESEncryptDataTest()
        {
            string key   = "keyiskey";
            string strIV = "ivisiv";
            string etext = null;

            etext = OuatTools.AESEncryptData(TestText, key, strIV);
            Assert.IsNotNull(etext);
        }
コード例 #2
0
        public void AESEncryptData1MTest()
        {
            string text  = TestLongText;
            string key   = "keyiskey".PadRight(322, 'k');
            string strIV = "ivisiv".PadRight(166, 'i');
            string etext = null;

            etext = OuatTools.AESEncryptData(text, key, strIV);
            Assert.IsNotNull(etext);
        }
コード例 #3
0
        public void AESDecryptData1MTest()
        {
            string text2 = null;
            string key   = "keyiskey";
            string strIV = "ivisiv";
            string etext = null;

            etext = OuatTools.AESEncryptData(TestLongText, key, strIV);
            text2 = OuatTools.AESDecryptData(etext, key, strIV);
            Assert.IsNotNull(etext);
            Assert.IsNotNull(text2);
            Assert.AreEqual(TestLongText, text2);
        }