CngKey.Create Metoda

Definice

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

Přetížení

Name Description
Create(CngAlgorithm)

Vytvoří CngKey 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)

Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs

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

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

Parametry

algorithm
CngAlgorithm

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

Návraty

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ý (to znamená, že se nezachová). Vytvoří také výchozí CngKeyCreationParameters objekt, který určuje výchozí CngProvider a další pokročilé parametry klíče.

Platí pro

Create(CngAlgorithm, String)

Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs

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

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

Parametry

algorithm
CngAlgorithm

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

keyName
String

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

Návraty

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)

Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs

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);
[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

Parametry

algorithm
CngAlgorithm

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

keyName
String

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

creationParameters
CngKeyCreationParameters

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

Návraty

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