CngKey.Create Méthode

Définition

Crée un objet CngKey qui représente une nouvelle clé.

Surcharges

Create(CngAlgorithm)

Crée un objet CngKey qui peut être utilisé avec l'algorithme spécifié.

Create(CngAlgorithm, String)

Crée un objet CngKey nommé qui fournit l'algorithme spécifié.

Create(CngAlgorithm, String, CngKeyCreationParameters)

Crée un objet CngKey nommé qui fournit l'algorithme spécifié, à l'aide des paramètres de création de clé fournis.

Create(CngAlgorithm)

Crée un objet CngKey qui peut être utilisé avec l'algorithme spécifié.

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

Paramètres

algorithm
CngAlgorithm

Algorithme avec lequel la clé sera utilisée.

Retours

CngKey

Une clé éphémère.

Attributs

Exceptions

algorithm a la valeur null.

CNG (Cryptography Next Generation) n’est pas pris en charge sur ce système.

Toutes les autres erreurs.

Remarques

Cette surcharge crée une clé sans nom, ce qui signifie que la clé est éphémère (autrement dit, elle ne sera pas conservée). Il crée également un objet par défaut qui spécifie une valeur par défaut CngKeyCreationParameters CngProvider et d’autres paramètres avancés pour la clé.

S’applique à

Create(CngAlgorithm, String)

Crée un objet CngKey nommé qui fournit l'algorithme spécifié.

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

Paramètres

algorithm
CngAlgorithm

Algorithme avec lequel la clé sera utilisée.

keyName
String

Nom de la clé. Si aucun nom n'est fourni, la clé ne sera pas rendue persistante.

Retours

CngKey

Une clé éphémère ou persistante qui fournit l'algorithme spécifié.

Attributs

Exceptions

algorithm a la valeur null.

CNG (Cryptography Next Generation) n’est pas pris en charge sur ce système.

Toutes les autres erreurs.

Remarques

Si keyName elle est fournie, cette surcharge crée une clé persistante. Si keyName elle n’est pas fournie, la clé sera éphémère. Cette surcharge crée également un objet par défaut qui spécifie une valeur par défaut CngKeyCreationParameters CngProvider et d’autres paramètres avancés pour la clé.

S’applique à

Create(CngAlgorithm, String, CngKeyCreationParameters)

Crée un objet CngKey nommé qui fournit l'algorithme spécifié, à l'aide des paramètres de création de clé fournis.

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

Paramètres

algorithm
CngAlgorithm

Algorithme avec lequel la clé sera utilisée.

keyName
String

Nom de la clé. Si aucun nom n'est fourni, la clé ne sera pas rendue persistante.

creationParameters
CngKeyCreationParameters

Un objet qui spécifie des paramètres avancés pour la méthode, notamment CngProvider.

Retours

CngKey

Une clé éphémère ou persistante qui fournit l'algorithme spécifié.

Attributs

Exceptions

algorithm a la valeur null.

CNG (Cryptography Next Generation) n’est pas pris en charge sur ce système.

Toutes les autres erreurs.

Remarques

Si keyName elle est fournie, cette surcharge crée une clé persistante. Si keyName elle n’est pas fournie, la clé sera éphémère.

S’applique à