private void btnLogin_Click(object sender, EventArgs e) { var appSettings = ConfigurationManager.AppSettings; string username = appSettings["username"]; string password = appSettings["password"]; SHA256SaltedMaker ssmUsername = new SHA256SaltedMaker(txtUsername.Text); SHA256SaltedMaker ssmPassword = new SHA256SaltedMaker(txtPassword.Text); //MessageBox.Show(ssmUsername.ToString()); //salt vero per test Cx{PdA]/>, if ((ssmUsername.ToString() == username) && (ssmPassword.ToString() == password)) { this.Hide(); Main mainWindow = new Main(); mainWindow.Show(); } else { MessageBox.Show("Username o Password sbagliati"); } }
private void btnSave_Click(object sender, EventArgs e) { SHA256SaltedMaker.UpdateSalt(txtNewSalt.Text); txtOldSalt.Text = SHA256SaltedMaker.PrintSalt(); }
public SaltScreen() { InitializeComponent(); txtOldSalt.Text = SHA256SaltedMaker.PrintSalt(); }