CngKey.Import Methode

Definition

Erstellt einen neuen Schlüssel, indem Schlüsselmaterial in den Schlüsselspeicheranbieter (KSP) importiert wird.

Überlädt

Import(Byte[], CngKeyBlobFormat, CngProvider)

Erstellt einen neuen Schlüssel durch Importieren des angegebenen Schlüsselmaterials mit dem angegebenen Format in den angegebenen Schlüsselspeicheranbieter (KSP).

Import(Byte[], CngKeyBlobFormat)

Erstellt einen neuen Schlüssel, indem das angegebene Schlüsselmaterial mit dem angegebenen Format in den Standardschlüsselspeicheranbieter (KSP) importiert wird.

Import(Byte[], CngKeyBlobFormat, CngProvider)

Erstellt einen neuen Schlüssel durch Importieren des angegebenen Schlüsselmaterials mit dem angegebenen Format in den angegebenen Schlüsselspeicheranbieter (KSP).

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

Parameter

keyBlob
Byte[]

Ein Array, das die Schlüsselinformationen enthält.

format
CngKeyBlobFormat

Ein Objekt, das das Format des keyBlob-Arrays angibt.

provider
CngProvider

Der KSP.

Gibt zurück

CngKey

Ein neuer Schlüssel.

Attribute

Ausnahmen

keyBlob, format oder provider ist null.

Cryptography Next Generation (CNG) wird auf diesem System nicht unterstützt.

Alle anderen Fehler.

Hinweise

Wichtig

Bei Windows Betriebssystemen vor Windows 7 und Windows Server 2008 R2 werden einige CNG-Schlüssel-Binärobjektformate (BLOB) nicht unterstützt.

Gilt für

Import(Byte[], CngKeyBlobFormat)

Erstellt einen neuen Schlüssel, indem das angegebene Schlüsselmaterial mit dem angegebenen Format in den Standardschlüsselspeicheranbieter (KSP) importiert wird.

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

Parameter

keyBlob
Byte[]

Ein Array, das die Schlüsselinformationen enthält.

format
CngKeyBlobFormat

Ein Objekt, das das Format des keyBlob-Arrays angibt.

Gibt zurück

CngKey

Ein neuer Schlüssel.

Attribute

Ausnahmen

keyBlob oder format ist null.

Cryptography Next Generation (CNG) wird auf diesem System nicht unterstützt.

Alle anderen Fehler.

Hinweise

Der Standard-KSP ist MicrosoftSoftwareKeyStorageProvider.

Wichtig

Bei Windows Betriebssystemen vor Windows 7 und Windows Server 2008 R2 werden einige CNG-Schlüssel-Binärobjektformate (BLOB) nicht unterstützt.

Gilt für