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

DHPublicKey

public class DHPublicKey : Asn1Encodable
using System; namespace Org.BouncyCastle.Asn1.X9 { public class DHPublicKey : Asn1Encodable { private readonly DerInteger m_y; public DerInteger Y => m_y; public static DHPublicKey GetInstance(object obj) { if (obj == null) return null; DHPublicKey dHPublicKey = obj as DHPublicKey; if (dHPublicKey != null) return dHPublicKey; return new DHPublicKey(DerInteger.GetInstance(obj)); } public static DHPublicKey GetInstance(Asn1TaggedObject obj, bool isExplicit) { return new DHPublicKey(DerInteger.GetInstance(obj, isExplicit)); } public static DHPublicKey GetTagged(Asn1TaggedObject obj, bool isExplicit) { return new DHPublicKey(DerInteger.GetTagged(obj, isExplicit)); } public DHPublicKey(DerInteger y) { if (y == null) throw new ArgumentNullException("y"); m_y = y; } public override Asn1Object ToAsn1Object() { return m_y; } } }