XmlElementSigner
Namespace: Lacuna.Pki.Xml
Assembly: Lacuna.Pki
Class
Provides methods for creating a XML signature of an specific XML element in a XML document
public class XmlElementSigner : XmlSigner
Hierarquia: object → XmlSigner → XmlElementSigner
Construtores
XmlElementSigner()
public XmlElementSigner()
Métodos
AddReferences(SignedXml, DigestAlgorithm, XmlPolicySpec)
protected override void AddReferences(SignedXml signedXml, DigestAlgorithm digestAlgorithm, XmlPolicySpec policy)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
signedXml | SignedXml | |
digestAlgorithm | DigestAlgorithm | |
policy | XmlPolicySpec |
GetToSignEntityTransferData()
protected override byte[] GetToSignEntityTransferData()
Retorno
InsertSignatureElement(XmlElement, string, XmlInsertionOptions)
protected override void InsertSignatureElement(XmlElement signatureElement, string xpath, XmlInsertionOptions insertionOption)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
signatureElement | XmlElement | |
xpath | string | |
insertionOption | XmlInsertionOptions |
SetIdResolutionTable(XmlIdResolutionTable)
Sets a table to handle the attribute ID name to be used as ID locally or globally in the XML
public void SetIdResolutionTable(XmlIdResolutionTable idResolutionTable)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
idResolutionTable | XmlIdResolutionTable |
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
public void SetToSignElementId(string elementId)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
elementId | string | 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
public void SetToSignElementXPath(string xpath, NamespaceManager namespaceMan)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
xpath | string | The XPath for selecting to sign element with ID |
namespaceMan | NamespaceManager | Namespaces and prefixed on XPath string, if needed |
SetToSignEntityTransferData(byte[])
protected override void SetToSignEntityTransferData(byte[] transferData)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
transferData | byte[] |
VerifyParameters(bool)
protected override void VerifyParameters(bool computeSignature)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
computeSignature | bool |
Membros herdados
xmlDocument, namespaceMan, SetXml(byte[]), SetXml(XmlDocument), SetPolicy(XmlPolicySpec), SetPolicy(IXmlPolicyMapper), SetSigningCertificate(PKCertificateWithKey), SetSigningCertificate(PKCertificate), SetSignatureElementLocation(string, NamespaceManager, XmlInsertionOptions), SetSignatureElementId(string), SetCommitmentType(CommitmentType), SetDataObjectFormat(string), SetTimestampRequester(ITimestampRequester), SetClassicEnvelopedTransformation(bool), SetCertificateValidationConfigurator(Action<CertificateValidationOptions>), GenerateToSignHash(out SignatureAlgorithm, out byte[]), SetPrecomputedSignature(byte[], byte[]), ComputeSignature(), VerifySignerParameters(bool), GetSignatureElement(), GetSignedXml(), InsertSignatureElement(), FulfillTransformations(Reference), Warnings, ValidationResults, ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()