Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

EncryptedReference Class

Note: This class is new in the .NET Framework version 2.0.

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 abstract class EncryptedReference
public abstract class EncryptedReference
public abstract class EncryptedReference

For more information about XML encryption standards, see http://www.w3.org/TR/xml-encryption-req.

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

using System;
using System.Security.Cryptography.Xml;
using System.Xml;
using System.IO;

/// This sample used the GetXml method in the CipherReference class to 
/// write the XML values for the CipherReference to the console.
namespace CipherReference2
{
	class CipherReference2
	{
		[STAThread]
		static void Main(string[] args)
		{
			//Create a URI string.
			String uri = "http://www.woodgrovebank.com/document.xml";

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

			//Create a transform chain and add the transform to it.
			TransformChain tc = new TransformChain();

			tc.Add(base64);

			//Create <CipherReference> information.
			CipherReference reference = new CipherReference(uri, tc);
			// Write the CipherReference value to the console.
			Console.WriteLine("Cipher Reference data: {0}", reference.GetXml().OuterXml);
		}
	}
}

package CipherReference2; 

import System.*;
import System.Security.Cryptography.Xml.*;
import System.Xml.*;
import System.IO.*;

/// This sample used the GetXml method in the CipherReference class to 
/// write the XML values for the CipherReference to the console.
class CipherReference2
{
    /** @attribute STAThread()
     */
    public static void main(String[] args)
    {
        //Create a URI string.
        String uri = "http://www.woodgrovebank.com/document.xml";
        // Create a Base64 transform. The input content retrieved from the
        // URI should be Base64-decoded before other processing.
        Transform base64 = new XmlDsigBase64Transform();
        //Create a transform chain and add the transform to it.
        TransformChain tc = new TransformChain();
        tc.Add(base64);
        //Create <CipherReference> information.
        CipherReference reference = new CipherReference(uri, tc);
        // Write the CipherReference value to the console.
        Console.WriteLine("Cipher Reference data: {0}", reference.GetXml().
            get_OuterXml());
    } //main
} //CipherReference2

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 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.

.NET Framework

Supported in: 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.