EncryptedReference Klasa

Definicja

Reprezentuje abstrakcyjną klasę bazową używaną w szyfrowaniu XML, z której CipherReferencepochodzą klasy , KeyReferencei DataReference .

public ref class EncryptedReference abstract
public abstract class EncryptedReference
type EncryptedReference = class
Public MustInherit Class EncryptedReference
Dziedziczenie
EncryptedReference
Pochodne

Przykłady

W poniższym przykładzie CipherReference użyto GetXml metody w klasie do zapisania wartości XML w konsoli programu .

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

Uwagi

Aby uzyskać więcej informacji na temat standardów szyfrowania XML, zobacz Wymagania dotyczące szyfrowania XML.

Konstruktory

Nazwa Opis
EncryptedReference()

Inicjuje nowe wystąpienie klasy EncryptedReference.

EncryptedReference(String, TransformChain)

Inicjuje nowe wystąpienie EncryptedReference klasy przy użyciu określonego identyfikatora URI (Uniform Resource Identifier) i łańcucha transformacji.

EncryptedReference(String)

Inicjuje nowe wystąpienie EncryptedReference klasy przy użyciu określonego identyfikatora URI (Uniform Resource Identifier).

Właściwości

Nazwa Opis
CacheValid

Pobiera wartość wskazującą, czy pamięć podręczna jest prawidłowa.

ReferenceType

Pobiera lub ustawia typ odwołania.

TransformChain

Pobiera lub ustawia łańcuch przekształceń EncryptedReference obiektu.

Uri

Pobiera lub ustawia identyfikator URI (Uniform Resource Identifier) EncryptedReference obiektu.

Metody

Nazwa Opis
AddTransform(Transform)

Transform Dodaje obiekt do bieżącego EncryptedReference łańcucha przekształceń obiektu.

Equals(Object)

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.

(Odziedziczone po Object)
GetHashCode()

Służy jako domyślna funkcja skrótu.

(Odziedziczone po Object)
GetType()

Pobiera Type bieżącego wystąpienia.

(Odziedziczone po Object)
GetXml()

Zwraca reprezentację EncryptedReference XML obiektu.

LoadXml(XmlElement)

Ładuje element XML do EncryptedReference obiektu.

MemberwiseClone()

Tworzy płytkią kopię bieżącego Object.

(Odziedziczone po Object)
ToString()

Zwraca ciąg reprezentujący bieżący obiekt.

(Odziedziczone po Object)

Dotyczy