CngKey.Create Metoda

Definice

CngKey Vytvoří objekt, který představuje nový klíč.

Přetížení

Create(CngAlgorithm)

CngKey Vytvoří objekt, který lze použít se zadaným algoritmem.

Create(CngAlgorithm, String)

Vytvoří pojmenovaný CngKey objekt, který poskytuje zadaný algoritmus.

Create(CngAlgorithm, String, CngKeyCreationParameters)

Vytvoří pojmenovaný CngKey objekt, který poskytuje zadaný algoritmus pomocí zadaných parametrů vytvoření klíče.

Create(CngAlgorithm)

CngKey Vytvoří objekt, který lze použít se zadaným algoritmem.

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

Parametry

algorithm
CngAlgorithm

Algoritmus, se kterým se klíč použije.

Návraty

CngKey

Dočasný klíč.

Atributy

Výjimky

algorithm je null.

Kryptografie next generation (CNG) není v tomto systému podporována.

Všechny ostatní chyby.

Poznámky

Toto přetížení vytvoří klíč bez názvu, což znamená, že klíč je dočasný (tj. nebude zachován). Vytvoří také výchozí CngKeyCreationParameters objekt, který určuje výchozí CngProvider a další pokročilé parametry klíče.

Platí pro

Create(CngAlgorithm, String)

Vytvoří pojmenovaný CngKey objekt, který poskytuje zadaný algoritmus.

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

Parametry

algorithm
CngAlgorithm

Algoritmus, se kterým se klíč použije.

keyName
String

Název klíče. Pokud není zadaný název, klíč se neuchová.

Návraty

CngKey

Trvalý nebo dočasný klíč, který poskytuje zadaný algoritmus.

Atributy

Výjimky

algorithm je null.

Kryptografie next generation (CNG) není v tomto systému podporována.

Všechny ostatní chyby.

Poznámky

Pokud keyName je k dispozici, toto přetížení vytvoří trvalý klíč. Pokud keyName není zadaný, klíč bude dočasný. Toto přetížení také vytvoří výchozí CngKeyCreationParameters objekt, který určuje výchozí CngProvider a další pokročilé parametry klíče.

Platí pro

Create(CngAlgorithm, String, CngKeyCreationParameters)

Vytvoří pojmenovaný CngKey objekt, který poskytuje zadaný algoritmus pomocí zadaných parametrů vytvoření klíče.

public:
 static System::Security::Cryptography::CngKey ^ Create(System::Security::Cryptography::CngAlgorithm ^ algorithm, System::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.Runtime.Versioning.SupportedOSPlatform("windows")]
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);
static member Create : System.Security.Cryptography.CngAlgorithm * string * System.Security.Cryptography.CngKeyCreationParameters -> System.Security.Cryptography.CngKey
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
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

Parametry

algorithm
CngAlgorithm

Algoritmus, se kterým se klíč použije.

keyName
String

Název klíče. Pokud není zadaný název, klíč se neuchová.

creationParameters
CngKeyCreationParameters

Objekt, který určuje pokročilé parametry pro metodu CngProvider, včetně .

Návraty

CngKey

Trvalý nebo dočasný klíč, který poskytuje zadaný algoritmus.

Atributy

Výjimky

algorithm je null.

Kryptografie next generation (CNG) není v tomto systému podporována.

Všechny ostatní chyby.

Poznámky

Pokud keyName je k dispozici, toto přetížení vytvoří trvalý klíč. Pokud keyName není zadaný, klíč bude dočasný.

Platí pro