DSACng 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 DSACng 类的新实例。
重载
| DSACng() | 使用随机的 2,048 位密钥对初始化 DSACng 类的新实例。 | 
| DSACng(Int32) | 使用具有指定大小的随机生成密钥初始化 DSACng 类的新实例。 | 
| DSACng(CngKey) | 使用指定的密钥初始化 DSACng 类的新实例。 | 
DSACng()
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
使用随机的 2,048 位密钥对初始化 DSACng 类的新实例。
public:
 DSACng();[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public DSACng();public DSACng();Public Sub New ()- 属性
适用于
DSACng(Int32)
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
使用具有指定大小的随机生成密钥初始化 DSACng 类的新实例。
public:
 DSACng(int keySize);[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public DSACng(int keySize);public DSACng(int keySize);[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.DSACng : int -> System.Security.Cryptography.DSACngnew System.Security.Cryptography.DSACng : int -> System.Security.Cryptography.DSACngPublic Sub New (keySize As Integer)参数
- keySize
- Int32
要生成的密钥的大小(以位为单位)。
- 属性
例外
              keySize 无效。
注解
有效密钥大小范围为 512 到 3,072 位,增量为 64。 建议对所有密钥使用最小大小 2,048 位。
适用于
DSACng(CngKey)
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
使用指定的密钥初始化 DSACng 类的新实例。
public:
 DSACng(System::Security::Cryptography::CngKey ^ key);[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public DSACng(System.Security.Cryptography.CngKey key);public DSACng(System.Security.Cryptography.CngKey key);[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.DSACng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.DSACngnew System.Security.Cryptography.DSACng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.DSACngPublic Sub New (key As CngKey)参数
- key
- CngKey
要用于 DSA 操作的密钥。
- 属性
例外
              key 不是有效的 DSA 密钥。
              key 为 null。
注解
              CngKey.AlgorithmGroup的 key 必须为 CngAlgorithmGroup.Dsa。
此构造函数创建密钥的副本。 即使 key 已释放,DSA 中此密钥对象的副本也会保持活动状态。