本文整理汇总了C#中Security.DESEncrypt方法的典型用法代码示例。如果您正苦于以下问题:C# Security.DESEncrypt方法的具体用法?C# Security.DESEncrypt怎么用?C# Security.DESEncrypt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Security
的用法示例。
在下文中一共展示了Security.DESEncrypt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build_Trans_String
/// <summary>
/// 生成交易包
/// </summary>
/// <returns>DES加密的数据包+未加密的终端号</returns>
public String Build_Trans_String()
{
Hashtable ht = new Hashtable();
ht.Add("Operator_Account", this.Operator_Account);
ht.Add("Operator_Password", this.Operator_Password);
ht.Add("action", this.Action);
ht.Add("Trans_Time", this.Trans_Time);
ht.Add("Trans_Date", this.Trans_Date);
ht.Add("Shop_No", this.Shop_No);
ht.Add("Terminal_No", this.Terminal_No);
ht.Add("Card_No", this.Card_No);
ht.Add("track_2", this.Track_2);
ht.Add("password", this.Password);
ht.Add("new_password", this.NewPassword);
ht.Add("renew_password", this.ReNewPassword);
ht.Add("master_password", this.MasterPassword);
ht.Add("amount", this.Amount);
ht.Add("Current_Points", this.Current_Points);
ht.Add("Total_Points", this.Total_Points);
ht.Add("Batch_No", this.Batch_No);
ht.Add("Trace_No", this.Trace_No);
ht.Add("Old_Batch_No", this.Old_Batch_No);
ht.Add("Old_Trace_No", this.Old_Trace_No);
ht.Add("Payment_Count", this.Payment_Count);
ht.Add("Payment_Amount", this.Payment_Amount);
ht.Add("Deposit_Count", this.Deposit_Count);
ht.Add("Deposit_Amount", this.Deposit_Amount);
ht.Add("Points_Payment_Count", this.Points_Payment_Count);
ht.Add("Points_Payment_Amount", this.Points_Payment_Amount);
ht.Add("Points_Deposit_Count", this.Points_Deposit_Count);
ht.Add("Points_Deposit_Amount", this.Points_Deposit_Amount);
ht.Add("Overdue_date", this.Overdue_Date);
ht.Add("client_version", "1.0");
String trans_string = "";
foreach (DictionaryEntry de in ht)
{
//if (de.Value.ToString().Trim() != "")
//{
trans_string += ("'" + de.Key.ToString().ToLower() + "':'" + de.Value.ToString() + "',");
//}
}
trans_string = trans_string.Substring(0, trans_string.Length - 1);
trans_string = "{" + trans_string + "}";
CoolCard.Security security = new Security();
return (security.DESEncrypt(trans_string, this.Key) + this.Terminal_No);
}