private void button1_Click(object sender, EventArgs e) { String username = userName.Text; String pwd = password.Text; info.Text = ""; pwd = MyEncrypt.GetMD5(pwd); var v = _88448Class.Login(username, pwd, ""); if (v.IsLogined) { info.Location = new Point(26, 12); info.ForeColor = Color.Green; info.Text = v.Message; ConfigStore.bbsUser = username; ConfigStore.bbsPwd = password.Text; Program.mainForm.ChangeLuntan(2); Change(1); } else { info.ForeColor = Color.Red; info.Text = v.Message; info.Location = new Point(26, 90); } }
public static int GetUseTick(string info, string key, bool isdate) { int count = 0, error = 0; if (key.Length > 50) { string mw16 = MyEncrypt.GetMd5_16(info, true); string mw32 = MyEncrypt.GetMD5(info); string qian8 = key.Substring(0, 8); string num = MyEncrypt.FanZhuan(key.Substring(8, 4)); string zhong8 = key.Substring(12, 8); string date = MyEncrypt.DecryptB(MyEncrypt.FanZhuan(key.Substring(20, key.Length - 28))); mw16 = MyEncrypt.getRjCode(NumerStrToList(qian8), MyEncrypt.split(mw16)); mw32 = MyEncrypt.getRjCode(NumerStrToList(zhong8), MyEncrypt.split(mw32)); string str1 = mw16 + mw32; string str2 = key.Substring(key.Length - 8, 8); string today = DateTime.Now.Year + bu0(DateTime.Now.Month) + bu0(DateTime.Now.Day); Regex r = new Regex(@"^[0-9]*$"); int d1 = int.Parse(date); int d2 = int.Parse(today); if (!r.IsMatch(qian8)) { error++; } if (!r.IsMatch(zhong8)) { error++; } if (!r.IsMatch(date)) { error++; } if (!str1.Equals(str2)) { error++; } if (d1 > d2) { error++; } if (isdate && (d2 - d1) > 1) { error++; } if (error == 0) { num = MyEncrypt.CharToNumerStr(num); count = int.Parse(num); } else { count = count - error; } } return(count); }
public static string CreateKey(string info, string s) { string mw16 = MyEncrypt.GetMd5_16(info, true); string mw32 = MyEncrypt.GetMD5(info); List <int> i41 = MyEncrypt.GenerateNumber(4, 16); List <int> i42 = MyEncrypt.GenerateNumber(4, 32); mw16 = MyEncrypt.getRjCode(i41, MyEncrypt.split(mw16)); mw32 = MyEncrypt.getRjCode(i42, MyEncrypt.split(mw32)); string date = DateTime.Now.Year + bu0(DateTime.Now.Month) + bu0(DateTime.Now.Day); return(ListToString(i41) + MyEncrypt.FanZhuan(MyEncrypt.getNumChar(s)) + ListToString(i42) + MyEncrypt.FanZhuan(MyEncrypt.EncryptA(date)) + mw16 + mw32); }
private void button1_Click(object sender, EventArgs e) { String pwd = pwd_text.Text; String jqm = jiqima.Text; String zh = zh_text.Text; pwd = MyEncrypt.GetMd5_16(pwd, true); pwd = MyEncrypt.GetMD5(pwd); if (pwd.Equals(sap)) { errorInfo.ForeColor = Color.Green; errorInfo.Text = "生成成功!"; String text = TickCute.CreateKey(jqm, zh); textBox1.Text = text; Clipboard.SetData(DataFormats.Text, text); } else { errorInfo.ForeColor = Color.Red; errorInfo.Text = "错误!"; } }
private void button13_Click(object sender, EventArgs e) { Console.WriteLine(MyEncrypt.GetMD5(MyEncrypt.GetInfo())); Console.WriteLine(MyEncrypt.GetMd5_16(MyEncrypt.GetInfo(), true)); }