private void button1_Click(object sender, EventArgs e) { bob = new RSA(); alice = new RSA(); Int32 length = Int32.Parse(lengthBox.Text); bob.generateKeys(length); alice.generateKeys(length); aliceN.Text = alice.N.ToString("X"); aliceE.Text = alice.E.ToString("X"); aliceD.Text = alice.D.ToString("X"); bobN.Text = bob.N.ToString("X"); bobE.Text = bob.E.ToString("X"); bobD.Text = bob.D.ToString("X"); lengthBox.Visible = false; button1.Visible = false; lenghtLabel.Visible = false; M.Visible = true; getM.Visible = true; CipherText.Visible = true; C.Visible = true; decryptBob.Visible = true; decryptAlice.Visible = true; OpenText.Visible = true; MForSignature.Visible = true; S.Visible = true; signAlice.Visible = true; signBob.Visible = true; verifyAlice.Visible = true; verifyBob.Visible = true; kBox.Visible = true; generateK.Visible = true; }
public Form1() { InitializeComponent(); RSA bob = new RSA(); RSA alice = new RSA(); }