//Generate Button private void Generate_Click(object sender, EventArgs e) { HashCodeGenerator hashCodeGenerator = new HashCodeGenerator(txtOriginatorSortCode.Text, txtRecipientSortCode.Text, txtPaymentValue.Text, txtRandomString.Text); string output = "" + hashCodeGenerator.GetSHA256(); txtGeneratedHash.Text = output; }
//Generate Button private void Generate_Click(object sender, EventArgs e) { HashCodeGenerator hashCodeGenerator = new HashCodeGenerator(txtOriginatorSortCode.Text, txtRecipientSortCode.Text, txtPaymentValue.Text, txtRandomNumber.Text, txtRandomString.Text); string output = "" + hashCodeGenerator.GetSHA256(); txtGeneratedHash.Text = output; MessageBox.Show("Hash Code Generated!", "Hash Code Tester", MessageBoxButtons.OK, MessageBoxIcon.Information); }
//Generate Button private void button1_Click(object sender, EventArgs e) { if (!Proceed("Have you completed all fields above?", "Generate")) { return; } HashCodeGenerator hashCodeGenerator = new HashCodeGenerator(txtOriginatorSortCode.Text, txtRecipientSortCode.Text, txtPaymentValue.Text); if (!hashCodeGenerator.generatorValid) { MessageBox.Show("Invalid sort codes or payment value"); return; } string output = "" + hashCodeGenerator.SHA256().ToString(); textBox5.Text = output; }