CngKey.Import Метод

Определение

Создает новый ключ, импортируя материал ключа в поставщик хранилища ключей (KSP).

Перегрузки

Имя Описание
Import(Byte[], CngKeyBlobFormat, CngProvider)

Создает новый ключ, импортируя указанный материал ключа в указанный поставщик хранилища ключей (KSP), используя указанный формат.

Import(Byte[], CngKeyBlobFormat)

Создает новый ключ, импортируя указанный материал ключа в поставщик хранилища ключей по умолчанию (KSP) и используя указанный формат.

Import(Byte[], CngKeyBlobFormat, CngProvider)

Исходный код:
Cng.NotSupported.cs
Исходный код:
Cng.NotSupported.cs
Исходный код:
Cng.NotSupported.cs
Исходный код:
Cng.NotSupported.cs
Исходный код:
Cng.NotSupported.cs

Создает новый ключ, импортируя указанный материал ключа в указанный поставщик хранилища ключей (KSP), используя указанный формат.

public:
 static System::Security::Cryptography::CngKey ^ Import(cli::array <System::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);
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);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Import : byte[] * System.Security.Cryptography.CngKeyBlobFormat * System.Security.Cryptography.CngProvider -> System.Security.Cryptography.CngKey
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

The KSP.

Возвращаемое значение

Новый ключ.

Атрибуты

Исключения

keyBlob, или formatprovider есть null.

Криптография следующего поколения (CNG) не поддерживается в этой системе.

Все остальные ошибки.

Комментарии

Important

В операционных системах Windows до Windows 7 и Windows Server 2008 R2 некоторые форматы больших двоичных объектов CNG не поддерживаются.

Применяется к

Import(Byte[], CngKeyBlobFormat)

Исходный код:
Cng.NotSupported.cs
Исходный код:
Cng.NotSupported.cs
Исходный код:
Cng.NotSupported.cs
Исходный код:
Cng.NotSupported.cs
Исходный код:
Cng.NotSupported.cs

Создает новый ключ, импортируя указанный материал ключа в поставщик хранилища ключей по умолчанию (KSP) и используя указанный формат.

public:
 static System::Security::Cryptography::CngKey ^ Import(cli::array <System::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);
public static System.Security.Cryptography.CngKey Import(byte[] keyBlob, System.Security.Cryptography.CngKeyBlobFormat format);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Import : byte[] * System.Security.Cryptography.CngKeyBlobFormat -> System.Security.Cryptography.CngKey
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 .

Возвращаемое значение

Новый ключ.

Атрибуты

Исключения

keyBlob или format есть null.

Криптография следующего поколения (CNG) не поддерживается в этой системе.

Все остальные ошибки.

Комментарии

По умолчанию используется MicrosoftSoftwareKeyStorageProviderKSP.

Important

В операционных системах Windows до Windows 7 и Windows Server 2008 R2 некоторые форматы больших двоичных объектов CNG не поддерживаются.

Применяется к