CngKey.Create Método

Definição

Cria um CngKey objeto que representa uma nova chave.

Sobrecargas

Name Description
Create(CngAlgorithm)

Cria um CngKey objeto que pode ser usado com o algoritmo especificado.

Create(CngAlgorithm, String)

Cria um objeto nomeado CngKey que fornece o algoritmo especificado.

Create(CngAlgorithm, String, CngKeyCreationParameters)

Cria um objeto nomeado CngKey que fornece o algoritmo especificado, usando os parâmetros de criação de chave fornecidos.

Create(CngAlgorithm)

Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs

Cria um CngKey objeto que pode ser usado com o 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

O algoritmo com que a chave será usada.

Devoluções

Uma chave efémera.

Atributos

Exceções

algorithm é null.

A Criptografia de Nova Geração (CNG) não é suportada neste sistema.

Todos os outros erros.

Observações

Esta sobrecarga cria uma chave sem nome, o que significa que a chave é efémera (ou seja, não será persistida). Também cria um objeto padrão CngKeyCreationParameters que especifica um padrão CngProvider e outros parâmetros avançados para a chave.

Aplica-se a

Create(CngAlgorithm, String)

Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs

Cria um objeto nomeado CngKey que fornece o 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

O algoritmo com que a chave será usada.

keyName
String

O nome da chave. Se não for fornecido um nome, a chave não será mantida.

Devoluções

Uma chave persistente ou efémera que fornece o algoritmo especificado.

Atributos

Exceções

algorithm é null.

A Criptografia de Nova Geração (CNG) não é suportada neste sistema.

Todos os outros erros.

Observações

Se keyName for fornecida, esta sobrecarga cria uma chave persistente. Se keyName não for fornecida, a chave será efémera. Esta sobrecarga também cria um objeto por defeito CngKeyCreationParameters que especifica um padrão CngProvider e outros parâmetros avançados para a chave.

Aplica-se a

Create(CngAlgorithm, String, CngKeyCreationParameters)

Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs

Cria um objeto nomeado CngKey que fornece o algoritmo especificado, usando os parâmetros de criação de chave fornecidos.

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

O algoritmo com que a chave será usada.

keyName
String

O nome da chave. Se não for fornecido um nome, a chave não será mantida.

creationParameters
CngKeyCreationParameters

Um objeto que especifica parâmetros avançados para o método, incluindo o CngProvider.

Devoluções

Uma chave persistente ou efémera que fornece o algoritmo especificado.

Atributos

Exceções

algorithm é null.

A Criptografia de Nova Geração (CNG) não é suportada neste sistema.

Todos os outros erros.

Observações

Se keyName for fornecida, esta sobrecarga cria uma chave persistente. Se keyName não for fornecida, a chave será efémera.

Aplica-se a