-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
XmlDsigC14NWithCommentsTransform.xml
120 lines (100 loc) · 9.05 KB
/
XmlDsigC14NWithCommentsTransform.xml
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
<Type Name="XmlDsigC14NWithCommentsTransform" FullName="System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform">
<TypeSignature Language="C#" Value="public class XmlDsigC14NWithCommentsTransform : System.Security.Cryptography.Xml.XmlDsigC14NTransform" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit XmlDsigC14NWithCommentsTransform extends System.Security.Cryptography.Xml.XmlDsigC14NTransform" />
<TypeSignature Language="DocId" Value="T:System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform" />
<TypeSignature Language="VB.NET" Value="Public Class XmlDsigC14NWithCommentsTransform
Inherits XmlDsigC14NTransform" />
<TypeSignature Language="F#" Value="type XmlDsigC14NWithCommentsTransform = class
 inherit XmlDsigC14NTransform" />
<TypeSignature Language="C++ CLI" Value="public ref class XmlDsigC14NWithCommentsTransform : System::Security::Cryptography::Xml::XmlDsigC14NTransform" />
<AssemblyInfo>
<AssemblyName>System.Security</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Xml</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="System.Security.Cryptography.Xml" FromVersion="9.0.0.0" To="System.Security" ToVersion="4.0.0.0" FrameworkAlternate="netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
</TypeForwardingChain>
<Base>
<BaseTypeName>System.Security.Cryptography.Xml.XmlDsigC14NTransform</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Represents the C14N XML canonicalization transform for a digital signature as defined by the World Wide Web Consortium (W3C), with comments.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform> class represents the C14N XML canonicalization transform that describes the canonical form of an XML document. This transform allows a signer to create a digest using the canonical form of an XML document. A recipient can then verify the digital signature using the same canonical form of the XML document with the same transform.
Use the <xref:System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform> class when you need to sign an XML document that contains comments.
Note that you cannot directly create a new instance of a canonicalization transform class. To specify a canonicalization transform, pass the Uniform Resource Identifier (URI) that describes the transform to the <xref:System.Security.Cryptography.Xml.SignedInfo.CanonicalizationMethod%2A> property, which is accessible from the <xref:System.Security.Cryptography.Xml.SignedXml.SignedInfo%2A> property. To acquire a reference to the canonicalization transform, use the <xref:System.Security.Cryptography.Xml.SignedInfo.CanonicalizationMethodObject%2A> property, which is accessible from the <xref:System.Security.Cryptography.Xml.SignedXml.SignedInfo%2A> property.
The URI that describes the <xref:System.Security.Cryptography.Xml.XmlDsigExcC14NWithCommentsTransform> class is defined by the <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigExcC14NWithCommentsTransformUrl> field.
The URI that describes the <xref:System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform> class is defined by the <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigC14NWithCommentsTransformUrl> field and the <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigCanonicalizationWithCommentsUrl> field.
For more information about the C14N with comments transform, see Sections 6.5 and 6.6.1 of the W3C [XMLDSIG specification](https://www.w3.org/TR/xmldsig-core/). The canonicalization algorithm is defined in the W3C [Canonical XML specification](https://www.w3.org/TR/xml-c14n).
## Examples
This section contains two code examples. The first example demonstrates how to sign an XML file using a detached signature. This example creates a signature of `www.microsoft.com` in an XML file and then verifies the file. The second example demonstrates how to sign an XML file using an envelope signature. This example creates a signature of an XML file and then saves the signature in new XML file.
**Example #1**
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.XML.XmlDsigC14NWithCommentsTransform_Detached/CPP/sampledetached.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransform/Overview/sampledetached.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.XML.XmlDsigC14NWithCommentsTransform_Detached/VB/sampledetached.vb" id="Snippet1":::
**Example #2**
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.XML.XmlDsigC14NWithCommentsTransform_Envelope/CPP/sampleenvelope.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransform/Overview/sampleenvelope.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.XML.XmlDsigC14NWithCommentsTransform_Envelope/VB/sampleenvelope.vb" id="Snippet1":::
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public XmlDsigC14NWithCommentsTransform ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 XmlDsigC14NWithCommentsTransform();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Xml</AssemblyName>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
This section contains two code examples. The first example demonstrates how to sign an XML file using a detached signature. This example creates a signature of `www.microsoft.com` in an XML file and then verifies the file. The second example demonstrates how to sign an XML file using an envelope signature. This example creates a signature of an XML file and then saves the signature in new XML file.
**Example #1**
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.XML.XmlDsigC14NWithCommentsTransform_Detached/CPP/sampledetached.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransform/Overview/sampledetached.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.XML.XmlDsigC14NWithCommentsTransform_Detached/VB/sampledetached.vb" id="Snippet1":::
**Example #2**
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.XML.XmlDsigC14NWithCommentsTransform_Envelope/CPP/sampleenvelope.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransform/Overview/sampleenvelope.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.XML.XmlDsigC14NWithCommentsTransform_Envelope/VB/sampleenvelope.vb" id="Snippet1":::
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>