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

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