Пример #1
0
        private void ExtractPrivateKey()
        {
            if (!PublicKeyAlgorithm.PrivateKeyDecrypted)
            {
                PinEntry frm    = new PinEntry();
                bool     Result = false;
                do
                {
                    if (frm.ShowDialog() == DialogResult.Cancel)
                    {
                        break;
                    }

                    Result = PublicKeyAlgorithm.DecryptS2K(frm.Password);
                } while (!Result);

                if (Result)
                {
                    SecretKeyNode.AddChildBlock(PublicKeyAlgorithm.GetPrivateByteBlocks());
                }
            }
        }