EncryptedReference Třída
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Představuje abstraktní základní třídu použitou v šifrování XML, ze které jsou odvozeny CipherReference, KeyReferencea DataReference třídy.
public ref class EncryptedReference abstract
public abstract class EncryptedReference
type EncryptedReference = class
Public MustInherit Class EncryptedReference
- Dědičnost
-
EncryptedReference
- Odvozené
Příklady
Následující příklad používá metodu GetXmlCipherReference ve třídě k zápisu hodnot XML do konzoly.
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
Poznámky
Další informace o standardech šifrování XML naleznete v tématu Požadavky na šifrování XML.
Konstruktory
| Name | Description |
|---|---|
| EncryptedReference() |
Inicializuje novou instanci EncryptedReference třídy. |
| EncryptedReference(String, TransformChain) |
Inicializuje novou instanci EncryptedReference třídy pomocí zadaného identifikátoru URI (Uniform Resource Identifier) a transformační řetězec. |
| EncryptedReference(String) |
Inicializuje novou instanci EncryptedReference třídy pomocí zadaného identifikátoru URI (Uniform Resource Identifier). |
Vlastnosti
| Name | Description |
|---|---|
| CacheValid |
Získá hodnotu, která určuje, zda je mezipaměť platná. |
| ReferenceType |
Získá nebo nastaví typ odkazu. |
| TransformChain |
Získá nebo nastaví transformační řetězec objektu EncryptedReference . |
| Uri |
Získá nebo nastaví identifikátor URI (Uniform Resource Identifier) objektu EncryptedReference . |
Metody
| Name | Description |
|---|---|
| AddTransform(Transform) |
Transform Přidá objekt do aktuálního transformačního řetězce objektuEncryptedReference. |
| Equals(Object) |
Určuje, zda je zadaný objekt roven aktuálnímu objektu. (Zděděno od Object) |
| GetHashCode() |
Slouží jako výchozí funkce hash. (Zděděno od Object) |
| GetType() |
Získá Type aktuální instance. (Zděděno od Object) |
| GetXml() |
Vrátí reprezentaci XML objektu EncryptedReference . |
| LoadXml(XmlElement) |
Načte element XML do objektu EncryptedReference . |
| MemberwiseClone() |
Vytvoří mělkou kopii aktuálního Object. (Zděděno od Object) |
| ToString() |
Vrátí řetězec, který představuje aktuální objekt. (Zděděno od Object) |