EncryptionProperty Class
Represents the <EncryptionProperty> element used in XML encryption. This class cannot be inherited.
Assembly: System.Security (in System.Security.dll)
The EncryptionProperty type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | EncryptionProperty() | Initializes a new instance of the EncryptionProperty class. |
![]() | EncryptionProperty(XmlElement) | Initializes a new instance of the EncryptionProperty class using an XmlElement object. |
| Name | Description | |
|---|---|---|
![]() | Id | Gets the ID of the current EncryptionProperty object. |
![]() | PropertyElement | Gets or sets an XmlElement object that represents an EncryptionProperty object. |
![]() | Target | Gets the target of the EncryptionProperty object. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GetXml | Returns an XmlElement object that encapsulates an instance of the EncryptionProperty class. |
![]() | LoadXml | Parses the input XmlElement and configures the internal state of the EncryptionProperty object to match. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The EncryptionProperty class encapsulates the <EncryptionProperty> element defined by the World Wide Web Consortium XML Encryption specification located at http://www.w3.org/TR/xmlenc-core/.
Use the EncryptionProperty class to provide additional encryption information related to the EncryptedData and EncryptedKey elements. For example, use this class to specify a time stamp.
Note |
|---|
The HostProtectionAttribute attribute applied to this type or member has the following Resources property value: MayLeakOnAbort. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes. |
The following code example encrypts and decrypts an XML document. This code example creates an EncryptionProperty object that contains custom information about the EncryptedKey element, and adds the EncryptionProperty object to the EncryptionPropertyCollection collection of the EncryptedXml class. Finally, this code example displays information about the EncryptionProperty object and the EncryptionPropertyCollection collection.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
