ECDiffieHellmanCng.ImportParameters Method (ECParameters)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com 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
)

Parameters

parameters
Type: System.Security.Cryptography.ECParameters

The curve's parameters to import.

Exception Condition
CryptographicException

parameters does not validate.

NotSupportedException

parameters references a curve that cannot be imported..

PlatformNotSupportedException

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
Show: