Class XmlElementSigner
Provides methods for creating a XML signature of an specific XML element in a XML document
Inheritance
XmlElementSigner
Assembly: Lacuna.Pki.dll
Syntax
public class XmlElementSigner : XmlSigner
Constructors
XmlElementSigner()
Declaration
public XmlElementSigner()
Methods
AddReferences(SignedXml, DigestAlgorithm, XmlPolicySpec)
Declaration
protected override void AddReferences(SignedXml signedXml, DigestAlgorithm digestAlgorithm, XmlPolicySpec policy)
Parameters
Overrides
GetToSignEntityTransferData()
Declaration
protected override byte[] GetToSignEntityTransferData()
Returns
Overrides
InsertSignatureElement(XmlElement, String, XmlInsertionOptions)
Declaration
protected override void InsertSignatureElement(XmlElement signatureElement, string xpath, XmlInsertionOptions insertionOption)
Parameters
Overrides
SetIdResolutionTable(XmlIdResolutionTable)
Sets a table to handle the attribute ID name to be used as ID locally or globally in the XML
Declaration
public void SetIdResolutionTable(XmlIdResolutionTable idResolutionTable)
Parameters
SetToSignElementId(String)
Sets the element ID, in the passed XML document, which is going to be signed.
If the specific ID attribute value is not known, an XPath can be passed instead: See method SetToSignElementXPath
Declaration
public void SetToSignElementId(string elementId)
Parameters
Type |
Name |
Description |
String |
elementId |
The ID attribute of the element to be signed
|
SetToSignElementXPath(String, NamespaceManager)
Sets an XPath for selecting the element, with ID attribute, in the passed XML document, which is going to be signed
Declaration
public void SetToSignElementXPath(string xpath, NamespaceManager namespaceMan)
Parameters
Type |
Name |
Description |
String |
xpath |
The XPath for selecting to sign element with ID
|
NamespaceManager |
namespaceMan |
Namespaces and prefixed on XPath string, if needed
|
SetToSignEntityTransferData(Byte[])
Declaration
protected override void SetToSignEntityTransferData(byte[] transferData)
Parameters
Type |
Name |
Description |
Byte[] |
transferData |
|
Overrides
VerifyParameters(Boolean)
Declaration
protected override void VerifyParameters(bool computeSignature)
Parameters
Type |
Name |
Description |
Boolean |
computeSignature |
|
Overrides