EncryptedReference Класс

Определение

Представляет используемый в XML-шифровании абстрактный базовый класс, от которого наследуются классы CipherReference, KeyReference и DataReference.

public ref class EncryptedReference abstract
public abstract class EncryptedReference
type EncryptedReference = class
Public MustInherit Class EncryptedReference
Наследование
EncryptedReference
Производный

Примеры

В следующем примере метод в CipherReference классе используется GetXml для записи XML-значений в консоль.

#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

Комментарии

Дополнительные сведения о стандартах шифрования XML см. в разделе "Требования к шифрованию XML".

Конструкторы

EncryptedReference()

Инициализирует новый экземпляр класса EncryptedReference.

EncryptedReference(String)

Инициализирует новый экземпляр класса EncryptedReference с помощью указанного универсального кода ресурса (URI).

EncryptedReference(String, TransformChain)

Инициализирует новый экземпляр класса EncryptedReference указанным URI и цепочкой преобразований.

Свойства

CacheValid

Получает значение, указывающее, является ли кэш допустимым.

ReferenceType

Получает или задает ссылочный тип.

TransformChain

Получает или задает цепочку преобразований объекта EncryptedReference.

Uri

Получает или задает универсальный код ресурса (URI) объекта EncryptedReference.

Методы

AddTransform(Transform)

Добавляет объект Transform в цепочку преобразований объекта EncryptedReference.

Equals(Object)

Определяет, равен ли указанный объект текущему объекту.

(Унаследовано от Object)
GetHashCode()

Служит хэш-функцией по умолчанию.

(Унаследовано от Object)
GetType()

Возвращает объект Type для текущего экземпляра.

(Унаследовано от Object)
GetXml()

Возвращает XML-представление объекта EncryptedReference.

LoadXml(XmlElement)

Загружает XML-элемент в объект EncryptedReference.

MemberwiseClone()

Создает неполную копию текущего объекта Object.

(Унаследовано от Object)
ToString()

Возвращает строку, представляющую текущий объект.

(Унаследовано от Object)

Применяется к