<PackageReference Include="System.Security.Cryptography.Xml" Version="10.0.11" />

System.Security.Cryptography.Xml.EncryptionMethod

public class EncryptionMethod
Encapsulates the encryption algorithm used for XML encryption.
public string KeyAlgorithm { get; set; }

Gets or sets a Uniform Resource Identifier (URI) that describes the algorithm to use for XML encryption.

public int KeySize { get; set; }

Gets or sets the algorithm key size used for XML encryption.

Initializes a new instance of the EncryptionMethod class.

public EncryptionMethod(string algorithm)

Initializes a new instance of the EncryptionMethod class specifying an algorithm Uniform Resource Identifier (URI).

public XmlElement GetXml()

Returns an XmlElement object that encapsulates an instance of the EncryptionMethod class.

public void LoadXml(XmlElement value)

Parses the specified XmlElement object and configures the internal state of the EncryptionMethod object to match.