संपादित करें

इसके माध्यम से साझा किया गया


ECDiffieHellmanCng Constructors

Definition

Initializes a new instance of the ECDiffieHellmanCng class.

Overloads

ECDiffieHellmanCng()

Initializes a new instance of the ECDiffieHellmanCng class with a random key pair.

ECDiffieHellmanCng(Int32)

Initializes a new instance of the ECDiffieHellmanCng class with a random key pair, using the specified key size.

ECDiffieHellmanCng(CngKey)

Initializes a new instance of the ECDiffieHellmanCng class by using the specified CngKey object.

ECDiffieHellmanCng(ECCurve)

Creates a new instance of the ECDiffieHellmanCng class whose public/private key pair is generated over the specified curve.

ECDiffieHellmanCng()

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

Initializes a new instance of the ECDiffieHellmanCng class with a random key pair.

public:
 ECDiffieHellmanCng();
public ECDiffieHellmanCng ();
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDiffieHellmanCng ();
Public Sub New ()
Attributes

Remarks

The random key pair has a default public key length of 521 bits.

Applies to

ECDiffieHellmanCng(Int32)

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

Initializes a new instance of the ECDiffieHellmanCng class with a random key pair, using the specified key size.

public:
 ECDiffieHellmanCng(int keySize);
public ECDiffieHellmanCng (int keySize);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDiffieHellmanCng (int keySize);
[System.Security.SecurityCritical]
public ECDiffieHellmanCng (int keySize);
new System.Security.Cryptography.ECDiffieHellmanCng : int -> System.Security.Cryptography.ECDiffieHellmanCng
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanCng : int -> System.Security.Cryptography.ECDiffieHellmanCng
[<System.Security.SecurityCritical>]
new System.Security.Cryptography.ECDiffieHellmanCng : int -> System.Security.Cryptography.ECDiffieHellmanCng
Public Sub New (keySize As Integer)

Parameters

keySize
Int32

The size of the key. Valid key sizes are 256, 384, and 521 bits.

Attributes

Exceptions

keySize specifies an invalid length.

Cryptography Next Generation (CNG) classes are not supported on this system.

Remarks

The random key pair will have the public key length defined by the keySize parameter.

Applies to

ECDiffieHellmanCng(CngKey)

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

Initializes a new instance of the ECDiffieHellmanCng class by using the specified CngKey object.

public:
 ECDiffieHellmanCng(System::Security::Cryptography::CngKey ^ key);
public ECDiffieHellmanCng (System.Security.Cryptography.CngKey key);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDiffieHellmanCng (System.Security.Cryptography.CngKey key);
[System.Security.SecurityCritical]
public ECDiffieHellmanCng (System.Security.Cryptography.CngKey key);
new System.Security.Cryptography.ECDiffieHellmanCng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.ECDiffieHellmanCng
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanCng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.ECDiffieHellmanCng
[<System.Security.SecurityCritical>]
new System.Security.Cryptography.ECDiffieHellmanCng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.ECDiffieHellmanCng
Public Sub New (key As CngKey)

Parameters

key
CngKey

The key that will be used as input to the cryptographic operations performed by the current object.

Attributes

Exceptions

key is null.

key does not specify an Elliptic Curve Diffie-Hellman (ECDH) algorithm group.

Cryptography Next Generation (CNG) classes are not supported on this system.

Applies to

ECDiffieHellmanCng(ECCurve)

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

Creates a new instance of the ECDiffieHellmanCng class whose public/private key pair is generated over the specified curve.

public:
 ECDiffieHellmanCng(System::Security::Cryptography::ECCurve curve);
public ECDiffieHellmanCng (System.Security.Cryptography.ECCurve curve);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDiffieHellmanCng (System.Security.Cryptography.ECCurve curve);
new System.Security.Cryptography.ECDiffieHellmanCng : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDiffieHellmanCng
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanCng : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDiffieHellmanCng
Public Sub New (curve As ECCurve)

Parameters

curve
ECCurve

The curve used to generate the public/private key pair.

Attributes

Exceptions

curve does not validate.

Remarks

curve must validate (that is, it must return true) when passed to the ECCurve.Validate method and must be either a named or explicit prime.

Applies to