public Message dealMsg(Message msg) //处理信息1和信息13 { int b = 1000; DataBase1 a = new DataBase1(); UTF8Encoding enc = new UTF8Encoding(); string type = msg.type; Message result = new Message(); if (type == "01")//MESSAGE1 { if (a.compare1(msg.msg1_IDc) == 1) { result = new Message(msg.IDtgs, DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), b.ToString(), msg.msg1_IDc, msg.msg2_tkt_ADc); } } if (type == "03") { result = new Message(msg.msg4_key, msg.msg3_ser, DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), b.ToString(), msg.msg4_tkt, msg.msg4_tkt_ADc); } if (type == "13") { // Y.DecryptString(msg.msg13_pwd, private_key); a.Add(msg.msg13_IDC, msg.msg13_pwd); result = new Message(); } // else //{ // MessageBox.Show("发送数据有误!"); //} return(result); }
//获取客户端DES密钥 public static string getDESKey(string IDC) { string b; DataBase1 a = new DataBase1(); b = a.Getkey(IDC); return(b); }