예제 #1
0
        private void BtSetRandomCommonParams_Click(object sender, EventArgs e)
        {
            var dsaParams = DSAEDSController.GenerateParams(_random);

            tbParamP.Text = dsaParams.P.ToString();
            tbParamQ.Text = dsaParams.Q.ToString();
            tbParamG.Text = dsaParams.G.ToString();
        }
예제 #2
0
        private void TbClosedKey_TextChanged(object sender, EventArgs e)
        {
            CatchException(() =>
            {
                var closedKey = BigInteger.Parse((sender as TextBox)?.Text);
                var g         = int.Parse(tbParamG.Text);
                var p         = int.Parse(tbParamP.Text);

                tbOpenedKey.Text = DSAEDSController.CalculateOpenedKey(closedKey, g, p).ToString();
            });
        }