private void btnLogin_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtcorpid.Text)) { MessageBox.Show("请输入企业id"); return; } txtactivte.Text = StringSecurity.MD5Encrypt(StringSecurity.DESEncrypt(txtcorpid.Text) + "EC" + StringSecurity.DESEncrypt("YLTC") + DateTime.Now.Year); }
public static bool CheckActivte() { if (ServiceLocator.SystemSettings.ProxyInfo.DeviceCode == StringSecurity.MD5Encrypt(StringSecurity.RSAEncrypt(ServiceLocator.SystemSettings.ProxyInfo.Corpid) + "EC" + StringSecurity.RSAEncrypt(ServiceLocator.SystemSettings.ProxyInfo.CorpSrecret) + DateTime.Now.Year)) { return(true); } else { return(false); } }
private void button1_Click(object sender, EventArgs e) { textBox2.Text = StringSecurity.MD5Encrypt(textBox1.Text); }