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
ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs

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

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

パラメーター

algorithm
CngAlgorithm

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

返品

エフェメラル キー。

属性

例外

algorithmnullです。

このシステムでは、暗号化次世代 (CNG) はサポートされていません。

その他すべてのエラー。

注釈

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

適用対象

Create(CngAlgorithm, String)

ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs
ソース:
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.Runtime.Versioning.SupportedOSPlatform("windows")]
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);
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string keyName);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Create : System.Security.Cryptography.CngAlgorithm * string -> System.Security.Cryptography.CngKey
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です。

このシステムでは、暗号化次世代 (CNG) はサポートされていません。

その他すべてのエラー。

注釈

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

適用対象

Create(CngAlgorithm, String, CngKeyCreationParameters)

ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs
ソース:
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);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
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);
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);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Create : System.Security.Cryptography.CngAlgorithm * string * System.Security.Cryptography.CngKeyCreationParameters -> System.Security.Cryptography.CngKey
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です。

このシステムでは、暗号化次世代 (CNG) はサポートされていません。

その他すべてのエラー。

注釈

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

適用対象