CngKey.Create Metodo

Definizione

Crea un oggetto CngKey che rappresenta una nuova chiave.

Overload

Create(CngAlgorithm)

Crea un oggetto CngKey che può essere utilizzato con l'algoritmo specificato.

Create(CngAlgorithm, String)

Crea un oggetto CngKey denominato che fornisce l'algoritmo specificato.

Create(CngAlgorithm, String, CngKeyCreationParameters)

Crea un oggetto CngKey denominato che fornisce l'algoritmo specificato, utilizzando i parametri forniti per la creazione della chiave.

Create(CngAlgorithm)

Crea un oggetto CngKey che può essere utilizzato con l'algoritmo specificato.

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

Parametri

algorithm
CngAlgorithm

Algoritmo con il quale verrà utilizzata la chiave.

Restituisce

CngKey

Chiave effimera.

Attributi

Eccezioni

algorithm è null.

Cryptography Next Generation non è supportato in questo sistema.

Tutti gli altri errori.

Commenti

Questo overload crea una chiave senza un nome, il che significa che la chiave è effimerale, ovvero non verrà mantenuta. Crea anche un oggetto predefinito che specifica un parametro predefinito CngKeyCreationParameters CngProvider e altri parametri avanzati per la chiave.

Si applica a

Create(CngAlgorithm, String)

Crea un oggetto CngKey denominato che fornisce l'algoritmo specificato.

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

Parametri

algorithm
CngAlgorithm

Algoritmo con il quale verrà utilizzata la chiave.

keyName
String

Nome della chiave. Se non viene fornito alcun nome, la chiave non verrà salvata in modo permanente.

Restituisce

CngKey

Chiave persistente o effimera che fornisce l'algoritmo specificato.

Attributi

Eccezioni

algorithm è null.

Cryptography Next Generation non è supportato in questo sistema.

Tutti gli altri errori.

Commenti

Se keyName viene specificato, questo overload crea una chiave persistente. Se keyName non viene specificato, la chiave sarà temporaneo. Questo overload crea anche un oggetto predefinito che specifica un parametro predefinito CngKeyCreationParameters CngProvider e altri parametri avanzati per la chiave.

Si applica a

Create(CngAlgorithm, String, CngKeyCreationParameters)

Crea un oggetto CngKey denominato che fornisce l'algoritmo specificato, utilizzando i parametri forniti per la creazione della chiave.

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

Parametri

algorithm
CngAlgorithm

Algoritmo con il quale verrà utilizzata la chiave.

keyName
String

Nome della chiave. Se non viene fornito alcun nome, la chiave non verrà salvata in modo permanente.

creationParameters
CngKeyCreationParameters

Oggetto che specifica i parametri avanzati per il metodo, incluso CngProvider.

Restituisce

CngKey

Chiave persistente o effimera che fornisce l'algoritmo specificato.

Attributi

Eccezioni

algorithm è null.

Cryptography Next Generation non è supportato in questo sistema.

Tutti gli altri errori.

Commenti

Se keyName viene specificato, questo overload crea una chiave persistente. Se keyName non viene specificato, la chiave sarà temporaneo.

Si applica a