private void sendsign() { byte[] tobesigned = Encoding.ASCII.GetBytes(textBox2.Text); byte[] signed = RSACLASS.Sign(tobesigned, rsacrypt.ToXmlString(true)); string signedstr = Encoding.UTF8.GetString(signed); updateui("Sending preparation for signature"); Thread th1 = new Thread(new ParameterizedThreadStart(sendmsg)); th1.Start(Encoding.ASCII.GetBytes("thisissignature" + signed.Length)); Thread.Sleep(500); Thread th2 = new Thread(new ParameterizedThreadStart(sendmsg)); th2.Start(signed); }
private void button1_Click(object sender, EventArgs e) { rsacrypt.ImportParameters(RSACLASS.GenerateKeys()); textBox3.AppendText("Keys generated" + Environment.NewLine); }