Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                textBox3.Text = rsa.EncryptBlock(BigInteger.Parse(textBox1.Text)).ToString();
            }
            catch
            {
                MessageBox.Show("输入不合法");
            }
            //BigInteger x, y;
            //Console.WriteLine(Mathbase.ExtendGCD(27, 150,out x,out y));
            //Console.WriteLine(x+","+ y);

            /*Console.WriteLine(Mathbase.GetInverse(26, 101));
            *  Console.WriteLine(Mathbase.GetInverse(27, 101));
            *  Console.WriteLine(Mathbase.GetInverse(28, 101));
            *  Console.WriteLine(Mathbase.GetInverse(29, 101));
            *  Console.WriteLine(Mathbase.GetInverse(26, 105));
            *  Console.WriteLine(Mathbase.GetInverse(29, 105));*/
        }