CngKey.Create Methode

Definition

Erstellt ein CngKey Objekt, das einen neuen Schlüssel darstellt.

Überlädt

Name Beschreibung
Create(CngAlgorithm)

Erstellt ein CngKey Objekt, das mit dem angegebenen Algorithmus verwendet werden kann.

Create(CngAlgorithm, String)

Erstellt ein benanntes CngKey Objekt, das den angegebenen Algorithmus bereitstellt.

Create(CngAlgorithm, String, CngKeyCreationParameters)

Erstellt ein benanntes CngKey Objekt, das den angegebenen Algorithmus mithilfe der bereitgestellten Schlüsselerstellungsparameter bereitstellt.

Create(CngAlgorithm)

Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs

Erstellt ein CngKey Objekt, das mit dem angegebenen Algorithmus verwendet werden kann.

public:
 static System::Security::Cryptography::CngKey ^ Create(System::Security::Cryptography::CngAlgorithm ^ algorithm);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm);
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Create : System.Security.Cryptography.CngAlgorithm -> System.Security.Cryptography.CngKey
static member Create : System.Security.Cryptography.CngAlgorithm -> System.Security.Cryptography.CngKey
Public Shared Function Create (algorithm As CngAlgorithm) As CngKey

Parameter

algorithm
CngAlgorithm

Der Algorithmus, mit dem der Schlüssel verwendet wird.

Gibt zurück

Eine kurzlebige Taste.

Attribute

Ausnahmen

algorithm ist null.

Kryptografie der nächsten Generation (CNG) wird auf diesem System nicht unterstützt.

Alle anderen Fehler.

Hinweise

Diese Überladung erstellt einen Schlüssel ohne Namen, was bedeutet, dass der Schlüssel kurzlebig ist (d. h., er wird nicht beibehalten). Außerdem wird ein Standardobjekt erstellt, das einen Standardwert CngKeyCreationParametersCngProvider und andere erweiterte Parameter für den Schlüssel angibt.

Gilt für:

Create(CngAlgorithm, String)

Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs

Erstellt ein benanntes CngKey Objekt, das den angegebenen Algorithmus bereitstellt.

public:
 static System::Security::Cryptography::CngKey ^ Create(System::Security::Cryptography::CngAlgorithm ^ algorithm, System::String ^ keyName);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string? keyName);
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string? keyName);
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string keyName);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Create : System.Security.Cryptography.CngAlgorithm * string -> System.Security.Cryptography.CngKey
static member Create : System.Security.Cryptography.CngAlgorithm * string -> System.Security.Cryptography.CngKey
Public Shared Function Create (algorithm As CngAlgorithm, keyName As String) As CngKey

Parameter

algorithm
CngAlgorithm

Der Algorithmus, mit dem der Schlüssel verwendet wird.

keyName
String

Der Name des Schlüssels. Wenn kein Name angegeben wird, wird der Schlüssel nicht beibehalten.

Gibt zurück

Ein beibehaltener oder kurzlebiger Schlüssel, der den angegebenen Algorithmus bereitstellt.

Attribute

Ausnahmen

algorithm ist null.

Kryptografie der nächsten Generation (CNG) wird auf diesem System nicht unterstützt.

Alle anderen Fehler.

Hinweise

Wenn keyName diese Überladung bereitgestellt wird, wird ein beibehaltener Schlüssel erstellt. Wenn keyName nicht angegeben, wird der Schlüssel kurzlebig. Diese Überladung erstellt auch ein Standardobjekt, das einen Standardwert CngKeyCreationParametersCngProvider und andere erweiterte Parameter für den Schlüssel angibt.

Gilt für:

Create(CngAlgorithm, String, CngKeyCreationParameters)

Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs

Erstellt ein benanntes CngKey Objekt, das den angegebenen Algorithmus mithilfe der bereitgestellten Schlüsselerstellungsparameter bereitstellt.

public:
 static System::Security::Cryptography::CngKey ^ Create(System::Security::Cryptography::CngAlgorithm ^ algorithm, System::String ^ keyName, System::Security::Cryptography::CngKeyCreationParameters ^ creationParameters);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string? keyName, System.Security.Cryptography.CngKeyCreationParameters? creationParameters);
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string? keyName, System.Security.Cryptography.CngKeyCreationParameters? creationParameters);
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string keyName, System.Security.Cryptography.CngKeyCreationParameters creationParameters);
[System.Security.SecurityCritical]
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string keyName, System.Security.Cryptography.CngKeyCreationParameters creationParameters);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Create : System.Security.Cryptography.CngAlgorithm * string * System.Security.Cryptography.CngKeyCreationParameters -> System.Security.Cryptography.CngKey
static member Create : System.Security.Cryptography.CngAlgorithm * string * System.Security.Cryptography.CngKeyCreationParameters -> System.Security.Cryptography.CngKey
[<System.Security.SecurityCritical>]
static member Create : System.Security.Cryptography.CngAlgorithm * string * System.Security.Cryptography.CngKeyCreationParameters -> System.Security.Cryptography.CngKey
Public Shared Function Create (algorithm As CngAlgorithm, keyName As String, creationParameters As CngKeyCreationParameters) As CngKey

Parameter

algorithm
CngAlgorithm

Der Algorithmus, mit dem der Schlüssel verwendet wird.

keyName
String

Der Name des Schlüssels. Wenn kein Name angegeben wird, wird der Schlüssel nicht beibehalten.

creationParameters
CngKeyCreationParameters

Ein Objekt, das erweiterte Parameter für die Methode angibt, einschließlich der CngProvider.

Gibt zurück

Ein beibehaltener oder kurzlebiger Schlüssel, der den angegebenen Algorithmus bereitstellt.

Attribute

Ausnahmen

algorithm ist null.

Kryptografie der nächsten Generation (CNG) wird auf diesem System nicht unterstützt.

Alle anderen Fehler.

Hinweise

Wenn keyName diese Überladung bereitgestellt wird, wird ein beibehaltener Schlüssel erstellt. Wenn keyName nicht angegeben, wird der Schlüssel kurzlebig.

Gilt für: