CngKey.Import Método
Definição
Cria uma nova chave importando o material da chave para o KSP (provedor de armazenamento de chaves).Creates a new key by importing key material into the key storage provider (KSP).
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.Creates a new key by importing the specified key material into the specified key storage provider (KSP), using the specified format. |
| 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.Creates a new key by importing the specified key material into the default key storage provider (KSP) and using the specified format. |
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.Creates a new key by importing the specified key material into the specified key storage provider (KSP), using the specified format.
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.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.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.An array that contains the key information.
- format
- CngKeyBlobFormat
Um objeto que especifica o formato da matriz keyBlob.An object that specifies the format of the keyBlob array.
- provider
- CngProvider
O KSP.The KSP.
Retornos
Uma nova chave.A new key.
- Atributos
Exceções
keyBlob, format ou provider é null.keyBlob, format, or provider is null.
A CNG (Cryptography Next Generation) não é compatível com este sistema.Cryptography Next Generation (CNG) is not supported on this system.
Todos os outros erros.All other errors.
Comentários
Importante
Em sistemas operacionais Windows anteriores ao Windows 7 e ao Windows Server 2008 R2, não há suporte para alguns formatos de BLOB (objeto binário grande) de chave CNG.On Windows operating systems before Windows 7 and Windows Server 2008 R2, some CNG key binary large object (BLOB) formats are not supported.
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.Creates a new key by importing the specified key material into the default key storage provider (KSP) and using the specified format.
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);
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.An array that contains the key information.
- format
- CngKeyBlobFormat
Um objeto que especifica o formato da matriz keyBlob.An object that specifies the format of the keyBlob array.
Retornos
Uma nova chave.A new key.
Exceções
keyBlob ou format é null.keyBlob or format is null.
A CNG (Cryptography Next Generation) não é compatível com este sistema.Cryptography Next Generation (CNG) is not supported on this system.
Todos os outros erros.All other errors.
Comentários
O KSP padrão é MicrosoftSoftwareKeyStorageProvider .The default KSP is MicrosoftSoftwareKeyStorageProvider.
Importante
Em sistemas operacionais Windows anteriores ao Windows 7 e ao Windows Server 2008 R2, não há suporte para alguns formatos de BLOB (objeto binário grande) de chave CNG.On Windows operating systems before Windows 7 and Windows Server 2008 R2, some CNG key binary large object (BLOB) formats are not supported.