ECDiffieHellmanCng.ImportParameters Method (ECParameters)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Imports the specified parameters for an ECCurve object as a key into the current instance.

Namespace:   System.Security.Cryptography
Assembly:  System.Core (in System.Core.dll)

public override void ImportParameters(
	ECParameters parameters


Type: System.Security.Cryptography.ECParameters

The curve's parameters to import.

Exception Condition

parameters does not validate.


parameters references a curve that cannot be imported..


parameters references a curve that is not supported by this platform.

The ImportParameters method replaces the existing key that this object is working with by creating a new CngKey object. If parameters contains only the Q field, then only a public key is imported. If parameters also contains D, then a full key pair is be imported. The parameterCurvevalue specifies the type of the curve to import.

.NET Framework
Available since 4.7
Return to top