CngKey.Import Metoda

Definicja

Tworzy nowy klucz przez zaimportowanie materiału klucza do dostawcy magazynu kluczy (KSP).

Przeciążenia

Import(Byte[], CngKeyBlobFormat, CngProvider)

Tworzy nowy klucz przez zaimportowanie określonego materiału klucza do określonego dostawcy magazynu kluczy (KSP) przy użyciu określonego formatu.

Import(Byte[], CngKeyBlobFormat)

Tworzy nowy klucz przez zaimportowanie określonego materiału klucza do domyślnego dostawcy magazynu kluczy (KSP) i użycie określonego formatu.

Import(Byte[], CngKeyBlobFormat, CngProvider)

Tworzy nowy klucz przez zaimportowanie określonego materiału klucza do określonego dostawcy magazynu kluczy (KSP) przy użyciu określonego formatu.

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

Parametry

keyBlob
Byte[]

Tablica zawierająca kluczowe informacje.

format
CngKeyBlobFormat

Obiekt określający format tablicy keyBlob .

provider
CngProvider

The KSP.

Zwraca

CngKey

Nowy klucz.

Atrybuty

Wyjątki

keyBlob, formatlub provider to null.

Kryptografia Następnej generacji (CNG) nie jest obsługiwana w tym systemie.

Wszystkie inne błędy.

Uwagi

Ważne

W systemach operacyjnych Windows przed Windows 7 i Windows Server 2008 R2 niektóre formaty plików binarnych (BLOB) klucza CNG nie są obsługiwane.

Dotyczy

Import(Byte[], CngKeyBlobFormat)

Tworzy nowy klucz przez zaimportowanie określonego materiału klucza do domyślnego dostawcy magazynu kluczy (KSP) i użycie określonego formatu.

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

Parametry

keyBlob
Byte[]

Tablica zawierająca kluczowe informacje.

format
CngKeyBlobFormat

Obiekt określający format tablicy keyBlob .

Zwraca

CngKey

Nowy klucz.

Atrybuty

Wyjątki

keyBlob lub format to null.

Kryptografia Następnej generacji (CNG) nie jest obsługiwana w tym systemie.

Wszystkie inne błędy.

Uwagi

Domyślnym dostawcą KSP jest MicrosoftSoftwareKeyStorageProvider.

Ważne

W systemach operacyjnych Windows przed Windows 7 i Windows Server 2008 R2 niektóre formaty plików binarnych (BLOB) klucza CNG nie są obsługiwane.

Dotyczy