Esempio n. 1
0
        private void RegGenerateFrm_Load(object sender, EventArgs e)
        {
            string str1 = Application.StartupPath;

            str1          = str1.Substring(0, str1.LastIndexOf('\\'));
            publicKeyPath = str1 + @"\Lics\";
            keysPath      = str1 + @"\Keys";
            myRsa         = new RSAEncrypt(keysPath);
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string str1 = Application.StartupPath;

            str1 = str1.Substring(0, str1.LastIndexOf('\\'));
            RSAEncrypt rsa = new RSAEncrypt(str1 + @"\Keys");

            rsa.GenericKey();
            MessageBox.Show("加解密密码生成成功!", "生成成功", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }