CngKey.Create Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Crea un CngKey objeto que representa una nueva clave.
Sobrecargas
| Nombre | Description |
|---|---|
| Create(CngAlgorithm) |
Crea un CngKey objeto que se puede usar con el algoritmo especificado. |
| Create(CngAlgorithm, String) |
Crea un objeto con nombre CngKey que proporciona el algoritmo especificado. |
| Create(CngAlgorithm, String, CngKeyCreationParameters) |
Crea un objeto con nombre CngKey que proporciona el algoritmo especificado mediante los parámetros de creación de claves proporcionados. |
Create(CngAlgorithm)
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
Crea un CngKey objeto que se puede usar con el algoritmo especificado.
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
Parámetros
- algorithm
- CngAlgorithm
Algoritmo con el que se usará la clave.
Devoluciones
Una clave efímera.
- Atributos
Excepciones
algorithm es null.
La criptografía de próxima generación (CNG) no se admite en este sistema.
Todos los demás errores.
Comentarios
Esta sobrecarga crea una clave sin un nombre, lo que significa que la clave es efímera (es decir, no se conservará). También crea un objeto predeterminado CngKeyCreationParameters que especifica un valor predeterminado CngProvider y otros parámetros avanzados para la clave.
Se aplica a
Create(CngAlgorithm, String)
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
Crea un objeto con nombre CngKey que proporciona el algoritmo especificado.
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
Parámetros
- algorithm
- CngAlgorithm
Algoritmo con el que se usará la clave.
- keyName
- String
El nombre de clave. Si no se proporciona un nombre, la clave no se conservará.
Devoluciones
Clave persistente o efímera que proporciona el algoritmo especificado.
- Atributos
Excepciones
algorithm es null.
La criptografía de próxima generación (CNG) no se admite en este sistema.
Todos los demás errores.
Comentarios
Si keyName se proporciona, esta sobrecarga crea una clave persistente. Si keyName no se proporciona, la clave será efímera. Esta sobrecarga también crea un objeto predeterminado CngKeyCreationParameters que especifica un valor predeterminado CngProvider y otros parámetros avanzados para la clave.
Se aplica a
Create(CngAlgorithm, String, CngKeyCreationParameters)
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
Crea un objeto con nombre CngKey que proporciona el algoritmo especificado mediante los parámetros de creación de claves proporcionados.
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
Parámetros
- algorithm
- CngAlgorithm
Algoritmo con el que se usará la clave.
- keyName
- String
El nombre de clave. Si no se proporciona un nombre, la clave no se conservará.
- creationParameters
- CngKeyCreationParameters
Objeto que especifica parámetros avanzados para el método, incluido .CngProvider
Devoluciones
Clave persistente o efímera que proporciona el algoritmo especificado.
- Atributos
Excepciones
algorithm es null.
La criptografía de próxima generación (CNG) no se admite en este sistema.
Todos los demás errores.
Comentarios
Si keyName se proporciona, esta sobrecarga crea una clave persistente. Si keyName no se proporciona, la clave será efímera.