EncryptedXml.GetDecryptionKey(EncryptedData, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从指定 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);
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
参数
- encryptedData
- EncryptedData
EncryptedData包含要检索的解密密钥的对象。
- symmetricAlgorithmUri
- String
要检索的解密密钥的大小。
返回
SymmetricAlgorithm与解密密钥关联的对象。
例外
参数的值 encryptedData 为 null.
注解
给定对象 EncryptedData 后,此方法将查找可用于检索纯文本数据的解密密钥。 如果指定了密钥名称,该方法将查找与密钥名称映射中定义的密钥名称关联的对称算法或非对称算法。 否则,如果指定了检索方法或 EncryptedKey 对象,该方法将加载对象 EncryptedKey 并调用 GetDecryptionKey 该方法。