/// <summary> /// 自定义加密算法,传入原始数据,返回加密结果 /// </summary> /// <param name="origin"></param> /// <returns>加密结果</returns> private string AuthorizeEncrypted(string origin) { //使用了组件支持的DES对称加密技术 string license = SoftSecurity.MD5Encrypt(origin, "CSTLASER"); return(license); }
/// <summary> /// 自定义加密算法,传入原始数据,返回加密结果 /// </summary> /// <param name="origin"></param> /// <returns>加密结果</returns> public static string AuthorizeEncrypted(string origin) { //DES对称加密 string license = SoftSecurity.MD5Encrypt(origin, "CSTLASER"); return(license); }
/// <summary> /// 一个自定义的加密方法,传入一个原始数据,返回一个加密结果 /// </summary> /// <param name="origin"></param> /// <returns></returns> private static string AuthorizeEncrypted(string origin) { // 此处使用了组件支持的DES对称加密技术 string Result = SoftSecurity.MD5Encrypt(origin, "12345678"); return(Result); }
private static void WriteCode(JObject licJObject) { try { string txt = SoftSecurity.MD5Encrypt(licJObject.ToString(), "bayuejun"); File.WriteAllText(Application.StartupPath + @"\license.lic", txt); } catch (Exception e) { Console.WriteLine(e); throw; } }
private void btnCalcuCode_Click(object sender, EventArgs e) { if (txtKey.Text.Trim().Length != 8) { MessageBoxEx.Show("秘钥必须为8位字母或数字"); return; } Dictionary <string, string> funcList = new Dictionary <string, string>(); GetFuncs(treeView1.Nodes, funcList); var funcJson = new JObject(); foreach (var variable in funcList) { funcJson.Add(variable.Key, variable.Value); } var licJObjectobj = new JObject { { "dateType", chkDateType.Checked }, { "licDate", DateTime.Now }, { "lastDate", DateTime.Now }, { "expireDate", dateTimeExpire.Value } }; var sourceJObjectobj = new JObject { { "softName", cmbSoftName.SelectedItem.ToString() }, { "lic", licJObjectobj }, { "softVersion", funcJson }, { "machineCode", txtMachineCode.Text } }; txtCode.Text = SoftSecurity.MD5Encrypt(sourceJObjectobj.ToString(), txtKey.Text); }
/// <summary> /// 此处使用了组件支持的DES对称加密技术 /// </summary> /// <param name="origin"></param> /// <returns></returns> public string AuthorizeEncrypted(string origin) { return(SoftSecurity.MD5Encrypt(origin, "19951005")); }
/// <summary> /// 使用指定的加密实现数据加密 /// </summary> public override void SaveToFile() { SaveToFile(m => SoftSecurity.MD5Encrypt(m, CommonProtocol.Security)); }
/// <summary> /// 使用指定的加密实现数据加密 /// </summary> public override void SaveToFile() { SaveToFile(m => SoftSecurity.MD5Encrypt(m, UserSystem.Security)); }
private void SaveRedisSettings( ) { File.WriteAllText(SettingsPath, SoftSecurity.MD5Encrypt(JArray.FromObject(redisSettings).ToString( ), "oa8H01kz"), Encoding.UTF8); }
private string AuthorizeEncrypted(string origin) { //softAuthorize = new SoftAuthorize(); // 此处使用了组件支持的DES对称加密技术 return(SoftSecurity.MD5Encrypt(origin, "19951005")); }
/// <summary> /// 一个自定义的加密方法,传入一个原始数据,返回一个加密结果 /// </summary> /// <param name="origin"></param> /// <returns></returns> private string AuthorizeEncrypted(string origin) { return(SoftSecurity.MD5Encrypt(origin, textBox1.Text)); }
public override void SaveToFile() { SaveToFile(m => SoftSecurity.MD5Encrypt(m, CommonLibrary.Security)); }