This documentation is archived and is not being maintained.

EncryptedReference Class

Represents the abstract base class used in XML encryption from which the CipherReference, KeyReference, and DataReference classes derive.

Namespace:  System.Security.Cryptography.Xml
Assembly:  System.Security (in System.Security.dll)

public ref class EncryptedReference abstract

For more information about XML encryption standards, see

The following code example uses the GetXml method in the CipherReference class to write the XML values to the console.

#using <System.Xml.dll>
#using <System.Security.dll>
#using <System.dll>

using namespace System;
using namespace System::Security::Cryptography::Xml;
using namespace System::Xml;
using namespace System::IO;

/// This sample used the GetXml method in the CipherReference class to  
/// write the XML values for the CipherReference to the console.

int main()

   //Create a URI string.
   String^ uri = "";

   // Create a Base64 transform. The input content retrieved from the 
   // URI should be Base64-decoded before other processing.
   Transform^ base64 = gcnew XmlDsigBase64Transform;

   //Create a transform chain and add the transform to it.
   TransformChain^ tc = gcnew TransformChain;
   tc->Add( base64 );

   //Create <CipherReference> information.
   CipherReference ^ reference = gcnew CipherReference( uri,tc );

   // Write the CipherReference value to the console.
   Console::WriteLine( "Cipher Reference data: {0}", reference->GetXml()->OuterXml );

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0