File: CipherReference.xml

package info (click to toggle)
mono 6.14.1%2Bds2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,282,732 kB
  • sloc: cs: 11,182,461; xml: 2,850,281; ansic: 699,123; cpp: 122,919; perl: 58,604; javascript: 30,841; asm: 21,845; makefile: 19,602; sh: 10,973; python: 4,772; pascal: 925; sql: 859; sed: 16; php: 1
file content (174 lines) | stat: -rw-r--r-- 11,384 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?xml version="1.0" encoding="utf-8"?>
<Type Name="CipherReference" FullName="System.Security.Cryptography.Xml.CipherReference">
  <TypeSignature Language="C#" Value="public sealed class CipherReference : System.Security.Cryptography.Xml.EncryptedReference" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit CipherReference extends System.Security.Cryptography.Xml.EncryptedReference" />
  <AssemblyInfo>
    <AssemblyName>System.Security</AssemblyName>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
    <AssemblyVersion>4.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>System.Security.Cryptography.Xml.EncryptedReference</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <since version=".NET 2.0" />
    <remarks>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>This class represents the &lt;CipherReference&gt; element in XML encryption. It identifies a source which, when processed, yields the encrypted data.</para>
      <para>The actual encrypted data referenced by the &lt;CipherReference&gt; is obtained by the following process. The &lt;CipherReference&gt; URI property contains a Uniform Resource Identifier (URI) that is dereferenced. If the &lt;CipherReference&gt; element also contains a transform chain, the data resulting from dereferencing the URI is transformed as specified to produce the encrypted data. For example, if the encrypted data is base64-encoded within an XML document, the transforms would specify an XPath expression followed by a base64 decoding so the encrypted data can be extracted.</para>
      <para>The syntax of the URI and transforms is similar to that of XML digital signatures.  However, in XML digital signatures, both generation and validation processing start with the same source data and perform that transform in the same order. In XML encryption, the decrypting application has only the encrypted data and the specified transforms. The transforms are enumerated in the order necessary to obtain the encrypted data. </para>
      <para>Note   By default, you cannot dereference cipher references from documents with unknown sources, such as files from a Web site, because the <see cref="P:System.Security.Cryptography.Xml.EncryptedXml.DocumentEvidence" /> property is null. For example, when you attempt to decrypt a file containing a &lt;CipherReference&gt; element that references a file on the Web, a <see cref="T:System.Security.SecurityException" /> is thrown, even if the request is made by a fully trusted assembly.</para>
      <para>If you are sure the documents you are decrypting can be trusted, you can change this behavior for fully trusted applications by using the following code:</para>
      <code>        Evidence ev = new Evidence();
        ev.AddHost (new Zone(SecurityZone.MyComputer));
        EncryptedXml exml = new EncryptedXml(doc, ev);</code>
    </remarks>
    <summary>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Represents the &lt;CipherReference&gt; element in XML encryption. This class cannot be inherited.</para>
    </summary>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public CipherReference ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters />
      <Docs>
        <since version=".NET 2.0" />
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>This constructor creates a <see cref="T:System.Security.Cryptography.Xml.CipherReference" /> object that provides reference information for a <see cref="T:System.Security.Cryptography.Xml.CipherData" /> object. </para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Xml.CipherReference" /> class.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public CipherReference (string uri);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string uri) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="uri" Type="System.String" />
      </Parameters>
      <Docs>
        <since version=".NET 2.0" />
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>This constructor creates a <see cref="T:System.Security.Cryptography.Xml.CipherReference" /> object using a Uniform Resource Identifier (URI) that points to the encrypted data. The object is then used to provide reference information for a <see cref="T:System.Security.Cryptography.Xml.CipherData" /> object. </para>
          <para>You can use a URI to designate an XML file containing encrypted data. For example:</para>
          <para>String uri = "http://www.woodgrovebank.com/document.xml";</para>
          <para>You can also use a partial URI to designate that only a portion of an XML document is to be encrypted. For example, assume that an XML document named document.xml contains two MyForm elements as shown in the following XML code example:</para>
          <para>&lt;MyForm Id='Form1'&gt;</para>
          <para>&lt;! -- Form data here --&gt;</para>
          <para>&lt;/MyForm&gt;</para>
          <para>&lt;MyForm Id='Form2'&gt;</para>
          <para>&lt;! -- Form data here --&gt;</para>
          <para>&lt;/MyForm&gt;</para>
          <para>You can encrypt only the content in Form2 using a URI such as the following:</para>
          <para>String uri = "http://www.woodgrovebank.com/document.xml#Form2";</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Xml.CipherReference" /> class using the specified Uniform Resource Identifier (URI).</para>
        </summary>
        <param name="uri">
          <attribution license="cc4" from="Microsoft" modified="false" />A Uniform Resource Identifier (URI) pointing to the encrypted data.</param>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public CipherReference (string uri, System.Security.Cryptography.Xml.TransformChain tc);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string uri, class System.Security.Cryptography.Xml.TransformChain tc) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="uri" Type="System.String" />
        <Parameter Name="tc" Type="System.Security.Cryptography.Xml.TransformChain" />
      </Parameters>
      <Docs>
        <param name="tc">To be added.</param>
        <since version=".NET 2.0" />
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>This constructor creates a <see cref="T:System.Security.Cryptography.Xml.CipherReference" /> object using a Uniform Resource Identifier (URI) and transform chain to indicate the encrypted data. The object is then used to provide reference information for a <see cref="T:System.Security.Cryptography.Xml.CipherData" /> object.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Xml.CipherReference" /> class using the specified Uniform Resource Identifier (URI) and transform chain information.</para>
        </summary>
        <param name="uri">
          <attribution license="cc4" from="Microsoft" modified="false" />A Uniform Resource Identifier (URI) pointing to the encrypted data.</param>
      </Docs>
    </Member>
    <Member MemberName="GetXml">
      <MemberSignature Language="C#" Value="public override System.Xml.XmlElement GetXml ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Xml.XmlElement GetXml() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Xml.XmlElement</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <since version=".NET 2.0" />
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Use this method to output the &lt;CipherReference&gt; element in XML.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Returns the XML representation of a <see cref="T:System.Security.Cryptography.Xml.CipherReference" /> object.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>An <see cref="T:System.Xml.XmlElement" /> that represents the &lt;CipherReference&gt; element in XML encryption.</para>
        </returns>
      </Docs>
    </Member>
    <Member MemberName="LoadXml">
      <MemberSignature Language="C#" Value="public override void LoadXml (System.Xml.XmlElement value);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void LoadXml(class System.Xml.XmlElement value) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="value" Type="System.Xml.XmlElement" />
      </Parameters>
      <Docs>
        <since version=".NET 2.0" />
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Use this method to load an existing XML element into the <see cref="T:System.Security.Cryptography.Xml.CipherReference" /> object.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Loads XML information into the &lt;CipherReference&gt; element in XML encryption.</para>
        </summary>
        <param name="value">
          <attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Xml.XmlElement" /> object that represents an XML element to use as the reference.</param>
      </Docs>
    </Member>
  </Members>
</Type>