Пример #1
0
        /// <summary>
        /// Returns the private key.
        /// </summary>
        /// <returns></returns>
        public byte[] GetPrivateKey()
        {
            EnsurePrivate();

            var publicKey = new DerBitString(PublicKey.Q.GetEncoded());
            var ecpk      = new ECPrivateKeyStructure(BitLength, PrivateKey.D, publicKey, PublicKey.PublicKeyParamSet);

            return(ecpk.GetDerEncoded());
        }