EncryptedXml.GetDecryptionKey(EncryptedData, String) Método

Definición

Recupera la clave de descifrado del objeto especificado EncryptedData .

public:
 virtual System::Security::Cryptography::SymmetricAlgorithm ^ GetDecryptionKey(System::Security::Cryptography::Xml::EncryptedData ^ encryptedData, System::String ^ symmetricAlgorithmUri);
public virtual System.Security.Cryptography.SymmetricAlgorithm GetDecryptionKey(System.Security.Cryptography.Xml.EncryptedData encryptedData, string symmetricAlgorithmUri);
abstract member GetDecryptionKey : System.Security.Cryptography.Xml.EncryptedData * string -> System.Security.Cryptography.SymmetricAlgorithm
override this.GetDecryptionKey : System.Security.Cryptography.Xml.EncryptedData * string -> System.Security.Cryptography.SymmetricAlgorithm
Public Overridable Function GetDecryptionKey (encryptedData As EncryptedData, symmetricAlgorithmUri As String) As SymmetricAlgorithm

Parámetros

encryptedData
EncryptedData

Objeto EncryptedData que contiene la clave de descifrado que se va a recuperar.

symmetricAlgorithmUri
String

Tamaño de la clave de descifrado que se va a recuperar.

Devoluciones

Objeto SymmetricAlgorithm asociado a la clave de descifrado.

Excepciones

El valor del encryptedData parámetro es null.

El parámetro encryptedData tiene una EncryptionMethod propiedad que es null.

O bien

No se puede recuperar la clave cifrada mediante los parámetros especificados.

Comentarios

Dado un EncryptedData objeto, este método busca la clave de descifrado que se puede usar para recuperar los datos de texto sin formato. Si se especifica un nombre de clave, el método busca el algoritmo simétrico o el algoritmo asimétrico que está asociado al nombre de clave tal y como se define en la asignación de nombres de clave. De lo contrario, si se especifica un método de recuperación o un EncryptedKey objeto, el método carga el EncryptedKey objeto y llama al GetDecryptionKey método .

Se aplica a