CngKey.Import Método

Definición

Crea una nueva clave importando el material de clave al proveedor de almacenamiento de claves (KSP).

Sobrecargas

Import(Byte[], CngKeyBlobFormat, CngProvider)

Crea una nueva clave mediante la importación del material de clave especificado en el proveedor de almacenamiento de claves (KSP), en el formato especificado.

Import(Byte[], CngKeyBlobFormat)

Crea una nueva clave importando el material de clave especificado al proveedor de almacenamiento de claves (KSP) predeterminado y utilizando el formato especificado.

Import(Byte[], CngKeyBlobFormat, CngProvider)

Crea una nueva clave mediante la importación del material de clave especificado en el proveedor de almacenamiento de claves (KSP), en el 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[]

Matriz de bytes que contiene la información de clave.

format
CngKeyBlobFormat

Objeto que especifica el formato de la matriz keyBlob.

provider
CngProvider

El KSP.

Devoluciones

CngKey

La nueva clave.

Atributos

Excepciones

keyBlob, format o provider es null.

Este sistema no es compatible con Cryptography Next Generation (CNG).

Todos los demás errores.

Comentarios

Importante

En los sistemas operativos Windows antes de Windows 7 y Windows Server 2008 R2, no se admiten algunos formatos de objetos binarios binarios (BLOB) de clave CNG.

Se aplica a

Import(Byte[], CngKeyBlobFormat)

Crea una nueva clave importando el material de clave especificado al proveedor de almacenamiento de claves (KSP) predeterminado y utilizando el 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[]

Matriz de bytes que contiene la información de clave.

format
CngKeyBlobFormat

Objeto que especifica el formato de la matriz keyBlob.

Devoluciones

CngKey

La nueva clave.

Atributos

Excepciones

keyBlob o format es null.

Este sistema no es compatible con Cryptography Next Generation (CNG).

Todos los demás errores.

Comentarios

El KSP predeterminado es MicrosoftSoftwareKeyStorageProvider.

Importante

En los sistemas operativos Windows antes de Windows 7 y Windows Server 2008 R2, no se admiten algunos formatos de objetos binarios binarios (BLOB) de clave CNG.

Se aplica a