Share via


EncryptedReference 클래스

정의

XML 암호화에서 CipherReference, KeyReferenceDataReference 클래스 파생에 사용되는 추상 기본 클래스를 나타냅니다.

public ref class EncryptedReference abstract
public abstract class EncryptedReference
type EncryptedReference = class
Public MustInherit Class EncryptedReference
상속
EncryptedReference
파생

예제

다음 예제에서는 클래스의 GetXml 메서드를 CipherReference 사용하여 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)

지정된 URI(Uniform Resource Identifier)를 사용하여 EncryptedReference 클래스의 새 인스턴스를 초기화합니다.

EncryptedReference(String, TransformChain)

지정된 URI(Uniform Resource Identifier)와 변환 체인을 사용하는 EncryptedReference 클래스의 새 인스턴스를 초기화합니다.

속성

CacheValid

캐시가 유효한지 여부를 나타내는 값을 가져옵니다.

ReferenceType

참조 형식을 가져오거나 설정합니다.

TransformChain

EncryptedReference 개체의 변환 체인을 가져오거나 설정합니다.

Uri

EncryptedReference 개체의 URI(Uniform Resource Identifier)를 가져오거나 설정합니다.

메서드

AddTransform(Transform)

Transform 개체를 EncryptedReference 개체의 현재 변환 체인에 추가합니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
GetXml()

EncryptedReference 개체의 XML 표현을 반환합니다.

LoadXml(XmlElement)

XML 요소를 EncryptedReference 개체에 로드합니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상