コード例 #1
0
ファイル: SendMessage.cs プロジェクト: maciakl/MyTPK
        public SendMessage()
        {
            InitializeComponent();
            Crypto = new MyTPKRSA();

            this.StartPosition = FormStartPosition.CenterParent;
        }
コード例 #2
0
ファイル: ReceiveMessage.cs プロジェクト: maciakl/MyTPK
        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;
        }