public void EncodeSHA1TestThrowsArgumentNullException368() { string s; EncryptBLL s0 = new EncryptBLL(); s = this.EncodeSHA1Test(s0, (string)null); }
public string EncodeSHA1Test([PexAssumeUnderTest] EncryptBLL target, string pass) { string result = target.EncodeSHA1(pass); return(result); // TODO: add assertions to method EncryptBLLTest.EncodeSHA1Test(EncryptBLL, String) }
private void btnResetPass_Click(object sender, EventArgs e) { EncryptBLL encrypt = new EncryptBLL(); LoginBLL lg = new LoginBLL(); DicBLL dic = new DicBLL(); ResetBLL rs = new ResetBLL(); string user = txtResetPass.Text; string pass = encrypt.EncodeSHA1(dic.defaultPass()); if (lg.isvaildEmail(user) == true) { if (lg.isvaildAccount(user) == true) { if (rs.successUpdate(user, pass) == true) { MessageBox.Show(dic.successResetMessage()); } else { MessageBox.Show(dic.errorResetMessage("error")); } } else { MessageBox.Show(dic.errorResetMessage("sai user")); } } else { MessageBox.Show(dic.errorResetMessage("sai email")); } }
public void EncodeSHA1Test250() { string s; EncryptBLL s0 = new EncryptBLL(); s = this.EncodeSHA1Test(s0, "�ࠀ\0"); Assert.AreEqual <string>("176e659ae8c369c4edea7630ead77f42f91d8c", s); Assert.IsNotNull((object)s0); }
public void EncodeSHA1Test682() { string s; EncryptBLL s0 = new EncryptBLL(); s = this.EncodeSHA1Test(s0, "�"); Assert.AreEqual <string>("9bdb77276c1852e1fb67820472812fcf684024", s); Assert.IsNotNull((object)s0); }
public void EncodeSHA1Test922() { string s; EncryptBLL s0 = new EncryptBLL(); s = this.EncodeSHA1Test(s0, ""); Assert.AreEqual <string>("da39a3ee5e6b4bd3255bfef95601890afd879", s); Assert.IsNotNull((object)s0); }
private void btnSignIn_Click(object sender, EventArgs e) { EncryptBLL encrypt = new EncryptBLL(); LoginBLL lg = new LoginBLL(); DicBLL dic = new DicBLL(); string user = txtEmail.Text; string pass = encrypt.EncodeSHA1(txtPass.Text); if (lg.isvaildEmail(user) == true) { if (lg.isvaildAccount(user) == true) { if (lg.isvaildPass(user, pass) == true) { if (lg.isActive(user) == true) { if (lg.isAdmin(user) == true) { admin = true; } else { admin = false; } idAccountlogin = lg.getID(user); } else { MessageBox.Show(dic.errorloginMessage("chua acitve")); } } else { MessageBox.Show(dic.errorloginMessage("sai pass")); } } else { MessageBox.Show(dic.errorloginMessage("sai user")); } } else { MessageBox.Show(dic.errorloginMessage("sai email")); } }
public void loginaction() { EncryptBLL encrypt = new EncryptBLL(); LoginBLL lg = new LoginBLL(); DicBLL dic = new DicBLL(); string user = txtEmail.Text; string pass = encrypt.EncodeSHA1(txtPass.Text); if (lg.isvaildEmail(user) == true) { if (lg.isvaildAccount(user) == true) { if (lg.isvaildPass(user, pass) == true) { if (lg.isActive(user) == true) { if (lg.isAdmin(user) == true) { admin = true; } else { admin = false; } idAccountlogin = lg.getID(user); if (lg.isCount(idAccountlogin) == true) { GUI.GUI_Program_ProgramList formlist = new GUI_Program_ProgramList(); formlist.Idaccount = idAccountlogin; formlist.admin = admin; formlist.FormClosing += delegate { this.Show(); }; //formlist.Formclosing += delegate{(this.Show(); }; formlist.Show(); this.Hide(); } else { Main mainform = new Main(); mainform.auth = 0; mainform.idaccountmain = idAccountlogin; mainform.admin = admin; mainform.FormClosing += delegate { bool log = mainform.log; if (log == true) { this.Show(); } else { Application.Exit(); } }; mainform.Show(); clean(); this.Hide(); } } else { MessageBox.Show(dic.errorloginMessage("chua acitve")); } } else { MessageBox.Show(dic.errorloginMessage("sai pass")); } } else { MessageBox.Show(dic.errorloginMessage("sai user")); } } else { MessageBox.Show(dic.errorloginMessage("sai email")); } }