EncryptedReference Clase

Definición

Representa la clase base abstracta utilizada en el cifrado XML de la que derivan las clases CipherReference, KeyReference y DataReference.

public ref class EncryptedReference abstract
public abstract class EncryptedReference
type EncryptedReference = class
Public MustInherit Class EncryptedReference
Herencia
EncryptedReference
Derivado

Ejemplos

En el ejemplo siguiente se usa el GetXml método de la CipherReference clase para escribir los valores XML en la consola.

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

[STAThread]
int main()
{
   
   //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 = 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 );
}
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);
        }
    }
}
Imports System.Security.Cryptography.Xml
Imports System.Xml
Imports System.IO


' This sample used the GetXml method in the CipherReference class
' to write the value of CipherReference to the console.
Module Module1

    Sub Main()
        ' Create a URI string.
        Dim uri As String = "http://www.woodgrovebank.com/document.xml"
        ' Create a Base64 transform. The input content retrieved from the
        ' URI should be Base64-decoded before other processing.
        Dim base64 As Transform = New XmlDsigBase64Transform
        Dim tc As New TransformChain
        tc.Add(base64)
        ' Create <CipherReference> information.
        Dim reference As CipherReference = New CipherReference(uri, tc)
    ' Write the XML for the CipherReference to the console.
    Console.WriteLine("Cipher Reference: {0}", reference.GetXml().OuterXml)
    End Sub

End Module

Comentarios

Para obtener más información sobre los estándares de cifrado XML, consulte Requisitos de cifrado XML.

Constructores

EncryptedReference()

Inicializa una nueva instancia de la clase EncryptedReference.

EncryptedReference(String)

Inicializa una nueva instancia de la clase EncryptedReference con el identificador uniforme de recursos (URI) especificado.

EncryptedReference(String, TransformChain)

Inicializa una nueva instancia de la clase EncryptedReference con el identificador uniforme de recursos (URI) y la cadena de transformación especificados.

Propiedades

CacheValid

Obtiene un valor que indica si la caché es válida.

ReferenceType

Obtiene o establece un tipo de referencia.

TransformChain

Obtiene o establece la cadena de transformación de un objeto EncryptedReference.

Uri

Obtiene o establece el identificador uniforme de recursos (URI) de un objeto EncryptedReference.

Métodos

AddTransform(Transform)

Agrega un objeto Transform a la cadena de transformación actual de un objeto EncryptedReference.

Equals(Object)

Determina si el objeto especificado es igual que el objeto actual.

(Heredado de Object)
GetHashCode()

Sirve como la función hash predeterminada.

(Heredado de Object)
GetType()

Obtiene el Type de la instancia actual.

(Heredado de Object)
GetXml()

Devuelve la representación XML de un objeto EncryptedReference.

LoadXml(XmlElement)

Carga un elemento XML en un objeto EncryptedReference.

MemberwiseClone()

Crea una copia superficial del Object actual.

(Heredado de Object)
ToString()

Devuelve una cadena que representa el objeto actual.

(Heredado de Object)

Se aplica a