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

System.Security.Cryptography.ECDiffieHellmanCngPublicKey

Specifies an Elliptic Curve Diffie-Hellman (ECDH) public key for use with the ECDiffieHellmanCng class.
public CngKeyBlobFormat BlobFormat { get; }

Gets the key BLOB format for a ECDiffieHellmanCngPublicKey object.

public static ECDiffieHellmanPublicKey FromByteArray(byte[] publicKeyBlob, CngKeyBlobFormat format)

Converts a byte array that contains a public key to a ECDiffieHellmanCngPublicKey object according to the specified format.

public static ECDiffieHellmanCngPublicKey FromXmlString(string xml)

Converts an XML string to an ECDiffieHellmanCngPublicKey object.

public CngKey Import()

Converts the ECDiffieHellmanCngPublicKey object to a CngKey object.