X509Certificate2.GetECDiffieHellmanPrivateKey Method

Definition

Gets the ECDiffieHellman private key from this certificate.

public System.Security.Cryptography.ECDiffieHellman? GetECDiffieHellmanPrivateKey ();

Returns

The private key, or null if this certificate does not have an ECDiffieHellman private key.

Exceptions

The handle is invalid.

Applies to

Product Versions
.NET 6, 7, 8, 9