EncryptedReference Classe

Definizione

Rappresenta la classe base astratta utilizzata nella crittografia XML da cui derivano le CipherReferenceclassi , KeyReferencee DataReference .

public ref class EncryptedReference abstract
public abstract class EncryptedReference
type EncryptedReference = class
Public MustInherit Class EncryptedReference
Ereditarietà
EncryptedReference
Derivato

Esempio

Nell'esempio seguente viene utilizzato il GetXml metodo nella CipherReference classe per scrivere i valori XML nella 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);
        }
    }
}
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

Commenti

Per altre informazioni sugli standard di crittografia XML, vedere Requisiti di crittografia XML.

Costruttori

Nome Descrizione
EncryptedReference()

Inizializza una nuova istanza della classe EncryptedReference.

EncryptedReference(String, TransformChain)

Inizializza una nuova istanza della EncryptedReference classe utilizzando l'URI (Uniform Resource Identifier) e la catena di trasformazione specificati.

EncryptedReference(String)

Inizializza una nuova istanza della EncryptedReference classe utilizzando l'URI (Uniform Resource Identifier) specificato.

Proprietà

Nome Descrizione
CacheValid

Ottiene un valore che indica se la cache è valida.

ReferenceType

Ottiene o imposta un tipo di riferimento.

TransformChain

Ottiene o imposta la catena di trasformazioni di un EncryptedReference oggetto .

Uri

Ottiene o imposta l'URI (Uniform Resource Identifier) di un EncryptedReference oggetto .

Metodi

Nome Descrizione
AddTransform(Transform)

Aggiunge un Transform oggetto alla catena di trasformazione corrente di un EncryptedReference oggetto .

Equals(Object)

Determina se l'oggetto specificato è uguale all'oggetto corrente.

(Ereditato da Object)
GetHashCode()

Funge da funzione hash predefinita.

(Ereditato da Object)
GetType()

Ottiene il Type dell'istanza corrente.

(Ereditato da Object)
GetXml()

Restituisce la rappresentazione XML di un EncryptedReference oggetto .

LoadXml(XmlElement)

Carica un elemento XML in un EncryptedReference oggetto .

MemberwiseClone()

Crea una copia superficiale del Objectcorrente.

(Ereditato da Object)
ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.

(Ereditato da Object)

Si applica a