Export (0) Print
Expand All

XmlDsigExcC14NWithCommentsTransform Class

Represents the exclusive C14N XML canonicalization transform for a digital signature as defined by the World Wide Web Consortium (W3C), with comments.

System.Object
  System.Security.Cryptography.Xml.Transform
    System.Security.Cryptography.Xml.XmlDsigExcC14NTransform
      System.Security.Cryptography.Xml.XmlDsigExcC14NWithCommentsTransform

Namespace:  System.Security.Cryptography.Xml
Assembly:  System.Security (in System.Security.dll)

[<HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)>]
type XmlDsigExcC14NWithCommentsTransform =  
    class 
        inherit XmlDsigExcC14NTransform 
    end

The XmlDsigExcC14NWithCommentsTransform type exposes the following members.

  NameDescription
Public methodXmlDsigExcC14NWithCommentsTransform()Initializes a new instance of the XmlDsigExcC14NWithCommentsTransform class.
Public methodXmlDsigExcC14NWithCommentsTransform(String)Initializes a new instance of the XmlDsigExcC14NWithCommentsTransform class specifying a list of namespace prefixes to canonicalize using the standard canonicalization algorithm.
Top

  NameDescription
Public propertyAlgorithmGets or sets the Uniform Resource Identifier (URI) that identifies the algorithm performed by the current transform. (Inherited from Transform.)
Public propertyContextGets or sets an XmlElement object that represents the document context under which the current Transform object is running. (Inherited from Transform.)
Public propertyInclusiveNamespacesPrefixListGets or sets a string that contains namespace prefixes to canonicalize using the standard canonicalization algorithm. (Inherited from XmlDsigExcC14NTransform.)
Public propertyInputTypesGets an array of types that are valid inputs to the LoadInput method of the current XmlDsigExcC14NTransform object. (Inherited from XmlDsigExcC14NTransform.)
Public propertyOutputTypesGets an array of types that are possible outputs from the GetOutput methods of the current XmlDsigExcC14NTransform object. (Inherited from XmlDsigExcC14NTransform.)
Public propertyPropagatedNamespacesGets or sets a Hashtable object that contains the namespaces that are propagated into the signature. (Inherited from Transform.)
Public propertyResolverSets the current XmlResolver object. (Inherited from Transform.)
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetDigestedOutputReturns the digest associated with a XmlDsigExcC14NTransform object. (Inherited from XmlDsigExcC14NTransform.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Protected methodGetInnerXmlReturns an XML representation of the parameters of a XmlDsigExcC14NTransform object that are suitable to be included as subelements of an XMLDSIG <Transform> element. (Inherited from XmlDsigExcC14NTransform.)
Public methodGetOutput()Returns the output of the current XmlDsigExcC14NTransform object (Inherited from XmlDsigExcC14NTransform.)
Public methodGetOutput(Type)Returns the output of the current XmlDsigExcC14NTransform object as an object of the specified type. (Inherited from XmlDsigExcC14NTransform.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetXmlReturns the XML representation of the current Transform object. (Inherited from Transform.)
Public methodLoadInnerXmlParses the specified XmlNodeList object as transform-specific content of a <Transform> element and configures the internal state of the current XmlDsigExcC14NTransform object to match the <Transform> element. (Inherited from XmlDsigExcC14NTransform.)
Public methodLoadInputWhen overridden in a derived class, loads the specified input into the current XmlDsigExcC14NTransform object. (Inherited from XmlDsigExcC14NTransform.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The XmlDsigExcC14NWithCommentsTransform class represents the exclusive C14N XML canonicalization transform with comments. This class is similar to the XmlDsigExcC14NTransform class, which allows a signer to create a digest using the canonical form of an XML document. However, the XmlDsigExcC14NWithCommentsTransform class excludes ancestor context from a canonicalized subdocument.

Use the XmlDsigExcC14NWithCommentsTransform class when you need to canonicalize an XML subdocument so that it is independent from its XML context. For example, applications such as Web services that use signed XML within complex communication protocols often need to canonicalize XML in this manner. Such applications often envelop XML within various dynamically constructed elements, which can substantially change the document and cause XML signature verification to fail. The XmlDsigExcC14NWithCommentsTransform class solves this problem by excluding such ancestor context from the canonical subdocument.

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 CanonicalizationMethod property, which is accessible from the SignedInfo property. To acquire a reference to the canonicalization transform, use the CanonicalizationMethodObject property, which is accessible from the SignedInfo property.

The URI that describes the XmlDsigExcC14NWithCommentsTransform class is defined by the XmlDsigExcC14NWithCommentsTransformUrl field.

For more information about the exclusive C14N transform, see the XMLDSIG specification, which is available from the World Wide Web Consortium (W3C) at www.w3.org/TR/xmldsig-core/. The canonicalization algorithm is defined in the W3C Canonical XML specification, which is available at www.w3.org/2001/10/xml-exc-c14n.

NoteNote

The HostProtectionAttribute attribute applied to this type or member has the following Resources property value: MayLeakOnAbort. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.

The following code example shows how to sign and verify an XML document using the XmlDsigExcC14NWithCommentsTransform class. This example creates an envelope signature.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft