EncryptedXml.GetDecryptionKey(EncryptedData, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the decryption key from the specified EncryptedData object.
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);
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
Parameters
- encryptedData
- EncryptedData
The EncryptedData object that contains the decryption key to retrieve.
- symmetricAlgorithmUri
- String
The size of the decryption key to retrieve.
Returns
A SymmetricAlgorithm object associated with the decryption key.
Exceptions
The value of the encryptedData
parameter is null
.
The encryptedData parameter has an EncryptionMethod property that is null.
-or-
The encrypted key cannot be retrieved using the specified parameters.
Remarks
Given an EncryptedData object, this method looks for the decryption key that can be used to retrieve the plain text data. If a key name is specified, the method looks for the symmetric algorithm or asymmetric algorithm that is associated with the key name as defined in the key name mapping. Otherwise, if a retrieval method or an EncryptedKey object is specified, the method loads the EncryptedKey object and calls the GetDecryptionKey method.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應