Share via


IXmlEncryptor.Encrypt(XElement) 方法

定義

加密指定的 XElement

public:
 Microsoft::AspNetCore::DataProtection::XmlEncryption::EncryptedXmlInfo ^ Encrypt(System::Xml::Linq::XElement ^ plaintextElement);
public Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo Encrypt (System.Xml.Linq.XElement plaintextElement);
abstract member Encrypt : System.Xml.Linq.XElement -> Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo
Public Function Encrypt (plaintextElement As XElement) As EncryptedXmlInfo

參數

plaintextElement
XElement

要加密的純文字。

傳回

EncryptedXmlInfo,其中包含 的 plaintextElement 加密值,以及如何解密它的相關資訊。

備註

這個方法的實作不得將 XElement 所提供的 plaintextElement 實例變動。

適用於