private void btnVerify_Click(object sender, EventArgs e) { DSClass ds = new DSClass(); string text = ds.Readfile(txtInput.Text); string signedtext = ds.Readfile(txtSign.Text); bool success = ds.VerifyData(text, signedtext, txtpublic.Text); if (success) { MessageBox.Show("True"); } else { MessageBox.Show("False"); } }
private void btnSign_Click(object sender, EventArgs e) { DSClass ds = new DSClass(); string text = ds.Readfile(txtInput.Text); string sign = ds.GetNameFromFullName(txtInput.Text); string signedtext = ds.SignData(text, txtprivate.Text); ds.SaveSignedMessage(signedtext, sign); string signedpath = sign + "_Signed.txt"; txtSign.Text = signedpath; MessageBox.Show("Signed"); }