CngKey.Create Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Crée un CngKey objet qui représente une nouvelle clé.
Surcharges
| Nom | Description |
|---|---|
| Create(CngAlgorithm) |
Crée un CngKey objet qui peut être utilisé avec l’algorithme spécifié. |
| Create(CngAlgorithm, String) |
Crée un objet nommé CngKey qui fournit l’algorithme spécifié. |
| Create(CngAlgorithm, String, CngKeyCreationParameters) |
Crée un objet nommé CngKey qui fournit l’algorithme spécifié, à l’aide des paramètres de création de clé fournis. |
Create(CngAlgorithm)
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
Crée un CngKey objet qui peut être utilisé avec l’algorithme spécifié.
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
Paramètres
- algorithm
- CngAlgorithm
Algorithme avec lequel la clé sera utilisée.
Retours
Une clé éphémère.
- Attributs
Exceptions
algorithm a la valeur null.
Le chiffrement de nouvelle génération (CNG) 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 un paramètre par défaut CngKeyCreationParametersCngProvider et d’autres paramètres avancés pour la clé.
S’applique à
Create(CngAlgorithm, String)
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
Crée un objet nommé CngKey qui fournit l’algorithme spécifié.
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
Paramètres
- algorithm
- CngAlgorithm
Algorithme avec lequel la clé sera utilisée.
- keyName
- String
Nom de la clé. Si un nom n’est pas fourni, la clé n’est pas conservée.
Retours
Clé persistante ou éphémère qui fournit l’algorithme spécifié.
- Attributs
Exceptions
algorithm a la valeur null.
Le chiffrement de nouvelle génération (CNG) 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 un paramètre par défaut CngKeyCreationParametersCngProvider et d’autres paramètres avancés pour la clé.
S’applique à
Create(CngAlgorithm, String, CngKeyCreationParameters)
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
Crée un objet nommé CngKey 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);
[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
Paramètres
- algorithm
- CngAlgorithm
Algorithme avec lequel la clé sera utilisée.
- keyName
- String
Nom de la clé. Si un nom n’est pas fourni, la clé n’est pas conservée.
- creationParameters
- CngKeyCreationParameters
Objet qui spécifie des paramètres avancés pour la méthode, y compris le CngProvider.
Retours
Clé persistante ou éphémère qui fournit l’algorithme spécifié.
- Attributs
Exceptions
algorithm a la valeur null.
Le chiffrement de nouvelle génération (CNG) 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.