CngKey.Import Método

Definição

Cria uma nova chave importando o material da chave para o KSP (provedor de armazenamento de chaves).

Sobrecargas

Import(Byte[], CngKeyBlobFormat, CngProvider)

Cria uma nova chave ao importar o material chave especificado para o KSP (provedor de armazenamento de chaves), usando o formato especificado.

Import(Byte[], CngKeyBlobFormat)

Cria uma nova chave ao importar o material chave especificado para o KSP (provedor de armazenamento de chaves) padrão, usando o formato especificado.

Import(Byte[], CngKeyBlobFormat, CngProvider)

Cria uma nova chave ao importar o material chave especificado para o KSP (provedor de armazenamento de chaves), usando o formato especificado.

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

Parâmetros

keyBlob
Byte[]

Uma matriz que contém as informações de chave.

format
CngKeyBlobFormat

Um objeto que especifica o formato da matriz keyBlob.

provider
CngProvider

O KSP.

Retornos

CngKey

Uma nova chave.

Atributos

Exceções

keyBlob, format ou provider é null.

A CNG (Cryptography Next Generation) não é compatível com este sistema.

Todos os outros erros.

Comentários

Importante

Em Windows sistemas operacionais antes de Windows 7 e Windows Server 2008 R2, não há suporte para alguns formatos blob (objeto binário grande) de chave CNG.

Aplica-se a

Import(Byte[], CngKeyBlobFormat)

Cria uma nova chave ao importar o material chave especificado para o KSP (provedor de armazenamento de chaves) padrão, usando o formato especificado.

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

Parâmetros

keyBlob
Byte[]

Uma matriz que contém as informações de chave.

format
CngKeyBlobFormat

Um objeto que especifica o formato da matriz keyBlob.

Retornos

CngKey

Uma nova chave.

Atributos

Exceções

keyBlob ou format é null.

A CNG (Cryptography Next Generation) não é compatível com este sistema.

Todos os outros erros.

Comentários

O KSP padrão é MicrosoftSoftwareKeyStorageProvider.

Importante

Em Windows sistemas operacionais antes de Windows 7 e Windows Server 2008 R2, não há suporte para alguns formatos blob (objeto binário grande) de chave CNG.

Aplica-se a