ECDiffieHellmanCng 构造函数

定义

初始化 ECDiffieHellmanCng 类的新实例。

重载

ECDiffieHellmanCng()

使用随机的密钥对初始化 ECDiffieHellmanCng 类的新实例。

ECDiffieHellmanCng(Int32)

使用指定密钥大小,通过随机密钥对来初始化 ECDiffieHellmanCng 类的新实例。

ECDiffieHellmanCng(CngKey)

使用指定的 CngKey 对象初始化 ECDiffieHellmanCng 类的新实例。

ECDiffieHellmanCng(ECCurve)

创建 ECDiffieHellmanCng 类的新实例,其公钥/私钥对通过指定曲线生成。

ECDiffieHellmanCng()

使用随机的密钥对初始化 ECDiffieHellmanCng 类的新实例。

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

注解

随机密钥配对的默认公钥长度为 521 位。

适用于

ECDiffieHellmanCng(Int32)

使用指定密钥大小,通过随机密钥对来初始化 ECDiffieHellmanCng 类的新实例。

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)

参数

keySize
Int32

密钥大小。 有效密钥大小是 256、384 和 521 位。

属性

例外

keySize 指定了无效的长度。

此系统不支持下一代加密技术 (CNG) 类。

注解

随机密钥配对将具有参数定义的keySize公钥长度。

适用于

ECDiffieHellmanCng(CngKey)

使用指定的 CngKey 对象初始化 ECDiffieHellmanCng 类的新实例。

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)

参数

key
CngKey

一个密钥,它将用作当前对象所执行的加密操作的输入。

属性

例外

keynull

key 未指定椭圆曲线 Diffie-Hellman (ECDH) 算法组。

此系统不支持下一代加密技术 (CNG) 类。

适用于

ECDiffieHellmanCng(ECCurve)

创建 ECDiffieHellmanCng 类的新实例,其公钥/私钥对通过指定曲线生成。

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)

参数

curve
ECCurve

用于生成公钥/私钥对的曲线。

属性

例外

curve 不进行验证。

注解

curve必须验证 (也就是说,当传递给ECCurve.Validate方法时,它必须返回true) ,并且必须是命名或显式的质数。

适用于