EncryptionPropertyCollection Class
Represents a collection of EncryptionProperty classes used in XML encryption. This class cannot be inherited.
Assembly: System.Security (in System.Security.dll)
The EncryptionPropertyCollection type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | EncryptionPropertyCollection | Initializes a new instance of the EncryptionPropertyCollection class. |
| Name | Description | |
|---|---|---|
![]() | Count | Gets the number of elements contained in the EncryptionPropertyCollection object. |
![]() | IsFixedSize | Gets a value that indicates whether the EncryptionPropertyCollection object has a fixed size. |
![]() | IsReadOnly | Gets a value that indicates whether the EncryptionPropertyCollection object is read-only. |
![]() | IsSynchronized | Gets a value that indicates whether access to the EncryptionPropertyCollection object is synchronized (thread safe). |
![]() | ItemOf | Gets or sets the EncryptionProperty object at the specified index. |
![]() | SyncRoot | Gets an object that can be used to synchronize access to the EncryptionPropertyCollection object. |
| Name | Description | |
|---|---|---|
![]() | Add | Adds an EncryptionProperty object to the EncryptionPropertyCollection object. |
![]() | Clear | Removes all items from the EncryptionPropertyCollection object. |
![]() | Contains | Determines whether the EncryptionPropertyCollection object contains a specific EncryptionProperty object. |
![]() | CopyTo(Array, Int32) | Copies the elements of the EncryptionPropertyCollection object to an array, starting at a particular array index. |
![]() | CopyTo(array<EncryptionProperty>, Int32) | Copies the elements of the EncryptionPropertyCollection object to an array of EncryptionProperty objects, starting at a particular array index. |
![]() | 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.) |
![]() | GetEnumerator | Returns an enumerator that iterates through an EncryptionPropertyCollection 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.) |
![]() | IndexOf | Determines the index of a specific item in the EncryptionPropertyCollection object. |
![]() | Insert | Inserts an EncryptionProperty object into the EncryptionPropertyCollection object at the specified position. |
![]() | Item | Returns the EncryptionProperty object at the specified index. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | Remove | Removes the first occurrence of a specific EncryptionProperty object from the EncryptionPropertyCollection object. |
![]() | RemoveAt | Removes the EncryptionProperty object at the specified index. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() | AsParallel | Enables parallelization of a query. (Defined by ParallelEnumerable.) |
![]() | AsQueryable | Converts an IEnumerable to an IQueryable. (Defined by Queryable.) |
![]() | Cast<TResult> | Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.) |
![]() | OfType<TResult> | Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IList::Add | Adds an item to the IList. |
![]() ![]() | IList::Contains | Determines whether the IList contains a specific value. |
![]() ![]() | IList::IndexOf | Determines the index of a specific item in the IList. |
![]() ![]() | IList::Insert | Inserts an item to the IList at the specified index. |
![]() ![]() | IList::Item | Gets the element at the specified index. |
![]() ![]() | IList::Remove | Removes the first occurrence of a specific object from the IList. |
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, you can 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.

