Assembly: System.Security (in system.security.dll)
This class represents the <EncryptedKey> element in XML encryption. The <EncryptedKey> element is used to send encryption keys. It can be created in a stand-alone XML document, be placed within an application document, or be inside an <EncryptedData> element as a child of a <KeyInfo> element. The key value is always encrypted to the recipient. When <EncryptedKey> is decrypted, the resulting key is made available to the <EncryptionMethod> algorithm without any additional processing.
The <EncryptedKey> element is similar to the <EncryptedData> element of the EncryptedData class except that the data encrypted is always a key value.
The following code example illustrates how to encrypt and decrypt an XML element using the EncryptedKey class. This example then displays the values of various properties of the EncryptedKey class to the console.
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.