Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            RSACryptoServiceProvider rsa = RSAHelper.CreateRsaProviderFromPrivateKey(textBox_pri_key.Text);

            // 解密
            byte[] jiemi = rsa.DecryptLargeData(textBox_jiemi_input.Text.ToHexBytes( ));
            if (radioButton3.Checked)
            {
                textBox_jiemi_result.Text = jiemi.ToHexString(' ');
            }
            else
            {
                textBox_jiemi_result.Text = Encoding.UTF8.GetString(jiemi);
            }
        }