RSACng.ImportParameters(RSAParameters) Método

Definição

Substitui a chave existente em que a instância atual está trabalhando, criando um novo CngKey para a estrutura dos parâmetros.Replaces the existing key that the current instance is working with by creating a new CngKey for the parameters structure.

public:
 override void ImportParameters(System::Security::Cryptography::RSAParameters parameters);
public override void ImportParameters (System.Security.Cryptography.RSAParameters parameters);
override this.ImportParameters : System.Security.Cryptography.RSAParameters -> unit
Public Overrides Sub ImportParameters (parameters As RSAParameters)

Parâmetros

parameters
RSAParameters

Os parâmetros RSA.The RSA parameters.

Exceções

parameters não contém um expoente nem um módulo.parameters contains neither an exponent nor a modulus.

parameters não é uma chave RSA válida.parameters is not a valid RSA key.

- ou --or- parameters é um par de chave completo e o KSP padrão é usado.parameters is a full key pair and the default KSP is used.

Comentários

Se parameters contiver apenas um expoente e um módulo, somente uma chave pública será importada.If parameters contains only an exponent and modulus, only a public key is imported. Se parameters também contiver valores P e Q, um par de chaves completo será importado.If parameters also contains P and Q values, a full key pair is imported.

Esse método cria um novo objeto de chave RSA efêmero usando os parâmetros especificados e substitui o Key valor pela nova chave, pois qualquer chave já aberta não é afetada por esse método.This method builds a new ephemeral RSA key object using the specified parameters and replaces the Key value with the new key, any already open key is unaffected by this method.

Aplica-se a