CngKey.Import メソッド

定義

キー マテリアルを KSP にインポートすることで、新しいキーを作成します。

オーバーロード

Import(Byte[], CngKeyBlobFormat, CngProvider)

指定したキー マテリアルを、指定した形式を使用して指定のキー記憶域プロバイダー (KSP) にインポートすることで、新しいキーを作成します。

Import(Byte[], CngKeyBlobFormat)

指定したキー マテリアルを、指定した形式を使用して既定の KSP にインポートすることで、新しいキーを作成します。

Import(Byte[], CngKeyBlobFormat, CngProvider)

指定したキー マテリアルを、指定した形式を使用して指定のキー記憶域プロバイダー (KSP) にインポートすることで、新しいキーを作成します。

public:
 static System::Security::Cryptography::CngKey ^ Import(cli::array <System::Byte> ^ keyBlob, System::Security::Cryptography::CngKeyBlobFormat ^ format, System::Security::Cryptography::CngProvider ^ provider);
public static System.Security.Cryptography.CngKey Import (byte[] keyBlob, System.Security.Cryptography.CngKeyBlobFormat format, System.Security.Cryptography.CngProvider provider);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Import (byte[] keyBlob, System.Security.Cryptography.CngKeyBlobFormat format, System.Security.Cryptography.CngProvider provider);
[System.Security.SecurityCritical]
public static System.Security.Cryptography.CngKey Import (byte[] keyBlob, System.Security.Cryptography.CngKeyBlobFormat format, System.Security.Cryptography.CngProvider provider);
static member Import : byte[] * System.Security.Cryptography.CngKeyBlobFormat * System.Security.Cryptography.CngProvider -> System.Security.Cryptography.CngKey
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Import : byte[] * System.Security.Cryptography.CngKeyBlobFormat * System.Security.Cryptography.CngProvider -> System.Security.Cryptography.CngKey
[<System.Security.SecurityCritical>]
static member Import : byte[] * System.Security.Cryptography.CngKeyBlobFormat * System.Security.Cryptography.CngProvider -> System.Security.Cryptography.CngKey
Public Shared Function Import (keyBlob As Byte(), format As CngKeyBlobFormat, provider As CngProvider) As CngKey

パラメーター

keyBlob
Byte[]

キー情報を格納する配列。

format
CngKeyBlobFormat

keyBlob 配列の形式を指定するオブジェクト。

provider
CngProvider

KSP。

戻り値

CngKey

新しいキー。

属性

例外

keyBlobformat、または providernull です。

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

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

注釈

重要

Windows 7 および Windows Server 2008 R2 より前の Windows オペレーティング システムでは、一部の CNG キー バイナリ ラージ オブジェクト (BLOB) 形式はサポートされていません。

適用対象

Import(Byte[], CngKeyBlobFormat)

指定したキー マテリアルを、指定した形式を使用して既定の KSP にインポートすることで、新しいキーを作成します。

public:
 static System::Security::Cryptography::CngKey ^ Import(cli::array <System::Byte> ^ keyBlob, System::Security::Cryptography::CngKeyBlobFormat ^ format);
public static System.Security.Cryptography.CngKey Import (byte[] keyBlob, System.Security.Cryptography.CngKeyBlobFormat format);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Import (byte[] keyBlob, System.Security.Cryptography.CngKeyBlobFormat format);
static member Import : byte[] * System.Security.Cryptography.CngKeyBlobFormat -> System.Security.Cryptography.CngKey
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Import : byte[] * System.Security.Cryptography.CngKeyBlobFormat -> System.Security.Cryptography.CngKey
Public Shared Function Import (keyBlob As Byte(), format As CngKeyBlobFormat) As CngKey

パラメーター

keyBlob
Byte[]

キー情報を格納する配列。

format
CngKeyBlobFormat

keyBlob 配列の形式を指定するオブジェクト。

戻り値

CngKey

新しいキー。

属性

例外

keyBlob または formatnull です。

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

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

注釈

既定の KSP は MicrosoftSoftwareKeyStorageProvider.

重要

Windows 7 および Windows Server 2008 R2 より前の Windows オペレーティング システムでは、一部の CNG キー バイナリ ラージ オブジェクト (BLOB) 形式はサポートされていません。

適用対象