EncryptedReference Class

Definition

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

C#
public abstract class EncryptedReference
Inheritance
EncryptedReference
Derived

Examples

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

C#
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);
        }
    }
}

Remarks

For more information about XML encryption standards, see XML Encryption Requirements.

Constructors

EncryptedReference()

Initializes a new instance of the EncryptedReference class.

EncryptedReference(String, TransformChain)

Initializes a new instance of the EncryptedReference class using the specified Uniform Resource Identifier (URI) and transform chain.

EncryptedReference(String)

Initializes a new instance of the EncryptedReference class using the specified Uniform Resource Identifier (URI).

Properties

CacheValid

Gets a value that indicates whether the cache is valid.

ReferenceType

Gets or sets a reference type.

TransformChain

Gets or sets the transform chain of an EncryptedReference object.

Uri

Gets or sets the Uniform Resource Identifier (URI) of an EncryptedReference object.

Methods

AddTransform(Transform)

Adds a Transform object to the current transform chain of an EncryptedReference object.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetXml()

Returns the XML representation of an EncryptedReference object.

LoadXml(XmlElement)

Loads an XML element into an EncryptedReference object.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9