示例#1
0
文件: Form1.cs 项目: serhadsencan/Rsa
        private void btnEncyrpt_Click(object sender, EventArgs e)
        {
            rsa.Gen_PublicKey(BigInteger.Parse(txt_P_val.Text), BigInteger.Parse(txt_Q_val.Text));
            string plain = txtPlainText.Text;

            byte[] dataToEncrypt = Encoding.ASCII.GetBytes(plain);
            rsa.Encyrpt(dataToEncrypt);
            txtCipherText.Text = rsa.cipherText;
        }