<PackageReference Include="BouncyCastle.Cryptography" Version="2.7.0-beta.98" />

DsaSecretBcpgKey

Base class for a DSA secret key.
using Org.BouncyCastle.Math; namespace Org.BouncyCastle.Bcpg { public class DsaSecretBcpgKey : BcpgObject, IBcpgKey { private readonly MPInteger m_x; public BigInteger X => m_x.Value; public string Format => "PGP"; public DsaSecretBcpgKey(BcpgInputStream bcpgIn) { m_x = new MPInteger(bcpgIn); } public DsaSecretBcpgKey(BigInteger x) { m_x = new MPInteger(x); } public override byte[] GetEncoded() { return BcpgOutputStream.GetEncodedOrNull(m_x); } public override void Encode(BcpgOutputStream bcpgOut) { m_x.Encode(bcpgOut); } } }