Ejemplo n.º 1
0
        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;
        }