예제 #1
0
        private void btnNewPubKey_Click(object sender, EventArgs e)
        {
            toolStripStatusLabel1.Text = "正在提取公钥...";
            string rText = Enc.getPublicKey(txtPrivatePEM.Text);

            tabControl1.SelectedIndex = 1;
            if (rText.Length == 0 && Enc.isErrorInfo())
            {
                toolStripStatusLabel1.Text = "提取公钥操作失败";
                MessageBox.Show(Enc.getErrorOnce(), "提取公钥操作失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                toolStripStatusLabel1.Text = "提取公钥完成。";
                txtPublicPEM.Text          = rText;
            }
        }