Share via


IXmlEncryptor.Encrypt(XElement) Method

Definition

Encrypts the specified 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

Parameters

plaintextElement
XElement

The plaintext to encrypt.

Returns

An EncryptedXmlInfo that contains the encrypted value of plaintextElement along with information about how to decrypt it.

Remarks

Implementations of this method must not mutate the XElement instance provided by plaintextElement.

Applies to