예제 #1
0
 protected override void CryptElement(System.Xml.XmlDocument xml, string hmac)
 {
     try
     {
         XmlNode node = xml.SelectSingleNode("//AllFullCardPassword");
         node.InnerText = CryptHelper.HMAC_DES(node.InnerText, StringHelper.DESKey);
     }
     catch
     {
     }
 }
예제 #2
0
        protected void ActionToExecute_Click(object sender, EventArgs e)
        {
            InitHead();
            Button btn = (Button)sender;

            switch (btn.ID)
            {
            case "btnHMAC_MD5":
                this.txbMsg.Text = CryptHelper.HMAC_MD5(this.txbMsg.Text.Replace(" ", ""), HMACMD5KEY);
                return;

            case "btnHMAC_DES":
                this.txbMsg.Text = CryptHelper.HMAC_DES(this.txbMsg.Text.Replace(" ", ""), "12345678");
                return;
            }

            ActionToExecute(AParamsData);
        }