예제 #1
0
 private void tbSrc_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         tbDest.Text = AESUtil.AESEncrypt(tbSrc.Text);
     }
 }
예제 #2
0
        public void TestAESEncrypt()
        {
            string key    = "706a344a66ff2e45";
            string data   = "hello";
            string result = AESUtil.AESEncrypt(data, key);

            Assert.AreEqual("Z6sZ75oV3Ekuy0XIB9ks5Q==", result);
        }