ECDsaCng 构造函数

定义

初始化 ECDsaCng 类的新实例。

重载

ECDsaCng()

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

ECDsaCng(Int32)

使用指定的目标密钥大小初始化 ECDsaCng 类的新实例。

ECDsaCng(CngKey)

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

ECDsaCng(ECCurve)

初始化 ECDsaCng 类的新实例,该类的公钥/私钥对通过指定曲线生成。

ECDsaCng()

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

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

例外

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

注解

此构造函数不会立即生成新的公钥/私钥。 此构造函数将 KeySize 属性设置为 521,当需要键时,保存的大小用于标识目标曲线。 如果通过 ImportParameters 方法或其他键导入方法加载密钥,则此构造函数中的密钥大小没有任何意义。

另请参阅

适用于

ECDsaCng(Int32)

使用指定的目标密钥大小初始化 ECDsaCng 类的新实例。

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

参数

keySize
Int32

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

属性

例外

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

keySize 指定了无效的长度。

注解

此构造函数不会立即生成新的公钥/私钥。 此构造函数将 KeySize 属性设置为所提供的值,当需要键时,保存的大小用于标识目标曲线。 如果通过 ImportParameters 方法或其他键导入方法加载密钥,则此构造函数中的密钥大小没有任何意义。

另请参阅

适用于

ECDsaCng(CngKey)

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

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

参数

key
CngKey

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

属性

例外

key 不指定椭圆曲线数字签名算法 (ECDSA) 组。

keynull

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

适用于

ECDsaCng(ECCurve)

初始化 ECDsaCng 类的新实例,该类的公钥/私钥对通过指定曲线生成。

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

参数

curve
ECCurve

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

属性

例外

curve 不进行验证。

curvenull

如果 curve 不包含带 FriendlyName 的 Oid。

注解

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

适用于