KeyReference Class

 

Represents the <KeyReference> element used in XML encryption. This class cannot be inherited.

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

System::Object
  System.Security.Cryptography.Xml::EncryptedReference
    System.Security.Cryptography.Xml::KeyReference

[HostProtectionAttribute(SecurityAction::LinkDemand, MayLeakOnAbort = true)]
public ref class KeyReference sealed : EncryptedReference

NameDescription
System_CAPS_pubmethodKeyReference()

Initializes a new instance of the KeyReference class for XML encryption.

System_CAPS_pubmethodKeyReference(String^)

Initializes a new instance of the KeyReference class for XML encryption using the supplied Uniform Resource Identifier (URI).

System_CAPS_pubmethodKeyReference(String^, TransformChain^)

Initializes a new instance of the KeyReference class for XML encryption using the specified Uniform Resource Identifier (URI) and a TransformChain object.

NameDescription
System_CAPS_protpropertyCacheValid

Gets a value that indicates whether the cache is valid.(Inherited from EncryptedReference.)

System_CAPS_pubpropertyTransformChain

Gets or sets the transform chain of an EncryptedReference object.(Inherited from EncryptedReference.)

System_CAPS_pubpropertyUri

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

NameDescription
System_CAPS_pubmethodAddTransform(Transform^)

Adds a Transform object to the current transform chain of an EncryptedReference object.(Inherited from EncryptedReference.)

System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodGetXml()

Returns the XML representation of an EncryptedReference object.(Inherited from EncryptedReference.)

System_CAPS_pubmethodLoadXml(XmlElement^)

Loads an XML element into an EncryptedReference object.(Inherited from EncryptedReference.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The KeyReference class represents the <KeyReference> element that contains information about the location of an encrypted key.

Use the <KeyReference> element to refer to <EncryptedKey> elements that were encrypted using the key defined in the enclosing <EncryptedKey> element. You can use multiple <KeyReference> elements when multiple <EncryptedKey> elements exist that are encrypted using the same key.

You can include additional information such as XPath transforms, decompression transforms, or information about how to retrieve the elements from a document storage facility to aid the decrypting application.

For more information about XML encryption standards, see the XML Encryption specification, which is available from the World Wide Web Consortium (W3C) at http://www.w3.org/TR/xmlenc-core/.

The following code example demonstrates how to use a KeyReference object while encrypting an XML document.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0

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

Return to top
Show: