예제 #1
0
파일: Form1.cs 프로젝트: Herqs/TCP_IP_SIGN
        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);
        }
예제 #2
0
파일: Form1.cs 프로젝트: Herqs/TCP_IP_SIGN
        private void button1_Click(object sender, EventArgs e)

        {
            rsacrypt.ImportParameters(RSACLASS.GenerateKeys());
            textBox3.AppendText("Keys generated" + Environment.NewLine);
        }