CngKeyCreationParameters.Parameters 属性

定义

可使用密钥创建完成之前设置的其他属性创建 CngKey 对象。

public:
 property System::Security::Cryptography::CngPropertyCollection ^ Parameters { System::Security::Cryptography::CngPropertyCollection ^ get(); };
public System.Security.Cryptography.CngPropertyCollection Parameters { get; }
member this.Parameters : System.Security.Cryptography.CngPropertyCollection
Public ReadOnly Property Parameters As CngPropertyCollection

属性值

一个集合对象,该集合对象包含密钥创建期间必须在 CngKey 对象上设置的所有其他参数。

注解

CngKeyCreationParameters 使你能够创建新 CngKey 对象并使用通用属性对其进行初始化。 如果在创建密钥期间必须对其设置其他属性,请执行以下步骤:

  1. 为必须设置的每个附加属性创建一个新 CngProperty 对象。

  2. Parameters调用 属性以获取空CngPropertyCollection对象。

  3. CngProperty 对象添加到 CngPropertyCollection 对象。

  4. Create(CngAlgorithm, String, CngKeyCreationParameters)调用 方法重载并将初始化CngKeyCreationParameters的对象传递给它。

适用于