Example #1
0
        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");
            }
        }
Example #2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     SHA256SaltedMaker.UpdateSalt(txtNewSalt.Text);
     txtOldSalt.Text = SHA256SaltedMaker.PrintSalt();
 }
Example #3
0
 public SaltScreen()
 {
     InitializeComponent();
     txtOldSalt.Text = SHA256SaltedMaker.PrintSalt();
 }