<PackageReference Include="System.Security.Cryptography.Cng" Version="5.0.0-preview.6.20305.6" />

System.Security.Cryptography.ECDiffieHellmanCng

public sealed class ECDiffieHellmanCng : ECDiffieHellman
Provides a Cryptography Next Generation (CNG) implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. This class is used to perform cryptographic operations.
namespace System.Security.Cryptography { public sealed class ECDiffieHellmanCng : ECDiffieHellman { public CngAlgorithm HashAlgorithm { get; set; } public byte[] HmacKey { get; set; } public CngKey Key { get; } public ECDiffieHellmanKeyDerivationFunction KeyDerivationFunction { get; set; } public byte[] Label { get; set; } public byte[] SecretAppend { get; set; } public byte[] SecretPrepend { get; set; } public byte[] Seed { get; set; } public bool UseSecretAgreementAsHmacKey { get; } public ECDiffieHellmanCng(); public ECDiffieHellmanCng(int keySize); public ECDiffieHellmanCng(CngKey key); public ECDiffieHellmanCng(ECCurve curve); public byte[] DeriveKeyMaterial(CngKey otherPartyPublicKey); public SafeNCryptSecretHandle DeriveSecretAgreementHandle(CngKey otherPartyPublicKey); public SafeNCryptSecretHandle DeriveSecretAgreementHandle(ECDiffieHellmanPublicKey otherPartyPublicKey); public void FromXmlString(string xml, ECKeyXmlFormat format); public string ToXmlString(ECKeyXmlFormat format); } }