CngKey.Create メソッド

定義

新しいキーを表す CngKey オブジェクトを作成します。

オーバーロード

Create(CngAlgorithm)

指定したアルゴリズムで使用できる CngKey オブジェクトを作成します。

Create(CngAlgorithm, String)

指定したアルゴリズムを提供する名前付きの CngKey オブジェクトを作成します。

Create(CngAlgorithm, String, CngKeyCreationParameters)

提供されたキー作成パラメーターを使用して、指定したアルゴリズムを提供する名前付きの CngKey オブジェクトを作成します。

Create(CngAlgorithm)

ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs

指定したアルゴリズムで使用できる CngKey オブジェクトを作成します。

public:
 static System::Security::Cryptography::CngKey ^ Create(System::Security::Cryptography::CngAlgorithm ^ algorithm);
public static System.Security.Cryptography.CngKey Create (System.Security.Cryptography.CngAlgorithm algorithm);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Create (System.Security.Cryptography.CngAlgorithm algorithm);
static member Create : System.Security.Cryptography.CngAlgorithm -> System.Security.Cryptography.CngKey
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Create : System.Security.Cryptography.CngAlgorithm -> System.Security.Cryptography.CngKey
Public Shared Function Create (algorithm As CngAlgorithm) As CngKey

パラメーター

algorithm
CngAlgorithm

キーが使用されるアルゴリズム。

戻り値

短期キー。

属性

例外

algorithmnullです。

Cryptography Next Generation (CNG) は、このシステムではサポートされていません。

上記以外のすべてのエラー。

注釈

このオーバーロードでは、名前のないキーが作成されます。つまり、キーはエフェメラルです (つまり、永続化されません)。 また、キーの既定 CngKeyCreationParameters のパラメーターとその他の高度なパラメーターを指定する既定 CngProvider の オブジェクトも作成します。

適用対象

Create(CngAlgorithm, String)

ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs

指定したアルゴリズムを提供する名前付きの CngKey オブジェクトを作成します。

public:
 static System::Security::Cryptography::CngKey ^ Create(System::Security::Cryptography::CngAlgorithm ^ algorithm, System::String ^ keyName);
public static System.Security.Cryptography.CngKey Create (System.Security.Cryptography.CngAlgorithm algorithm, string keyName);
public static System.Security.Cryptography.CngKey Create (System.Security.Cryptography.CngAlgorithm algorithm, string? keyName);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Create (System.Security.Cryptography.CngAlgorithm algorithm, string? keyName);
static member Create : System.Security.Cryptography.CngAlgorithm * string -> System.Security.Cryptography.CngKey
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Create : System.Security.Cryptography.CngAlgorithm * string -> System.Security.Cryptography.CngKey
Public Shared Function Create (algorithm As CngAlgorithm, keyName As String) As CngKey

パラメーター

algorithm
CngAlgorithm

キーが使用されるアルゴリズム。

keyName
String

キー名。 名前を指定しない場合は、キーが永続化されません。

戻り値

指定したアルゴリズムを提供する永続化されたキーまたは短期キー。

属性

例外

algorithmnullです。

Cryptography Next Generation (CNG) は、このシステムではサポートされていません。

上記以外のすべてのエラー。

注釈

が指定されている場合 keyName 、このオーバーロードは永続化されたキーを作成します。 が指定されていない場合 keyName 、キーはエフェメラルになります。 このオーバーロードでは、キーの既定 CngKeyCreationParameters のパラメーターとその他の高度なパラメーターを指定する既定のオブジェクトも作成されます CngProvider

適用対象

Create(CngAlgorithm, String, CngKeyCreationParameters)

ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs

提供されたキー作成パラメーターを使用して、指定したアルゴリズムを提供する名前付きの CngKey オブジェクトを作成します。

public:
 static System::Security::Cryptography::CngKey ^ Create(System::Security::Cryptography::CngAlgorithm ^ algorithm, System::String ^ keyName, System::Security::Cryptography::CngKeyCreationParameters ^ creationParameters);
public static System.Security.Cryptography.CngKey Create (System.Security.Cryptography.CngAlgorithm algorithm, string keyName, System.Security.Cryptography.CngKeyCreationParameters creationParameters);
public static System.Security.Cryptography.CngKey Create (System.Security.Cryptography.CngAlgorithm algorithm, string? keyName, System.Security.Cryptography.CngKeyCreationParameters? creationParameters);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Create (System.Security.Cryptography.CngAlgorithm algorithm, string? keyName, System.Security.Cryptography.CngKeyCreationParameters? creationParameters);
[System.Security.SecurityCritical]
public static System.Security.Cryptography.CngKey Create (System.Security.Cryptography.CngAlgorithm algorithm, string keyName, System.Security.Cryptography.CngKeyCreationParameters creationParameters);
static member Create : System.Security.Cryptography.CngAlgorithm * string * System.Security.Cryptography.CngKeyCreationParameters -> System.Security.Cryptography.CngKey
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Create : System.Security.Cryptography.CngAlgorithm * string * System.Security.Cryptography.CngKeyCreationParameters -> System.Security.Cryptography.CngKey
[<System.Security.SecurityCritical>]
static member Create : System.Security.Cryptography.CngAlgorithm * string * System.Security.Cryptography.CngKeyCreationParameters -> System.Security.Cryptography.CngKey
Public Shared Function Create (algorithm As CngAlgorithm, keyName As String, creationParameters As CngKeyCreationParameters) As CngKey

パラメーター

algorithm
CngAlgorithm

キーが使用されるアルゴリズム。

keyName
String

キー名。 名前を指定しない場合は、キーが永続化されません。

creationParameters
CngKeyCreationParameters

メソッドの詳細パラメーター (CngProvider など) を指定するオブジェクト。

戻り値

指定したアルゴリズムを提供する永続化されたキーまたは短期キー。

属性

例外

algorithmnullです。

Cryptography Next Generation (CNG) は、このシステムではサポートされていません。

上記以外のすべてのエラー。

注釈

が指定されている場合 keyName 、このオーバーロードは永続化されたキーを作成します。 が指定されていない場合 keyName 、キーはエフェメラルになります。

適用対象