ECSecretBcpgKey
Base class for an EC Secret Key.
using Org.BouncyCastle.Math;
namespace Org.BouncyCastle.Bcpg
{
public class ECSecretBcpgKey : BcpgObject, IBcpgKey
{
private readonly MPInteger m_x;
public virtual BigInteger X => m_x.Value;
public string Format => "PGP";
public ECSecretBcpgKey(BcpgInputStream bcpgIn)
{
m_x = new MPInteger(bcpgIn);
}
public ECSecretBcpgKey(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);
}
}
}