示例#1
0
        public SendMessage()
        {
            InitializeComponent();
            Crypto = new MyTPKRSA();

            this.StartPosition = FormStartPosition.CenterParent;
        }
示例#2
0
        public ReceiveMessage(MyTPKUI parent)
        {
            InitializeComponent();
            Crypto = new MyTPKRSA();

            this.key = Crypto.PublicKey;

            this.StartPosition = FormStartPosition.CenterParent;
        }
示例#3
0
文件: MyTPKUI.cs 项目: maciakl/MyTPK
        private void button3_Click(object sender, EventArgs e)
        {
            progressBar1.PerformStep();
            MyTPKRSA temp = new MyTPKRSA();
            progressBar1.PerformStep();

            progressBar1.PerformStep();
            temp.deletePersistentKey();
            progressBar1.PerformStep();

            progressBar1.PerformStep();
            temp.newSymmetricKeys();
            progressBar1.PerformStep();

            progressBar1.PerformStep();
            temp.getPersistentKey();
            progressBar1.PerformStep();

            progressBar1.Value = 100;

            MessageBox.Show(this, "New key pair generated", "Keys Generated", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);

            progressBar1.Value = 0;
        }