Pular para o conteúdo principal

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: objectXmlSignerXmlElementSigner

Construtores

XmlElementSigner()

public XmlElementSigner()

Métodos

AddReferences(SignedXml, DigestAlgorithm, XmlPolicySpec)

protected override void AddReferences(SignedXml signedXml, DigestAlgorithm digestAlgorithm, XmlPolicySpec policy)

Parâmetros

NomeTipoDescrição
signedXmlSignedXml
digestAlgorithmDigestAlgorithm
policyXmlPolicySpec

GetToSignEntityTransferData()

protected override byte[] GetToSignEntityTransferData()

Retorno

byte[]


InsertSignatureElement(XmlElement, string, XmlInsertionOptions)

protected override void InsertSignatureElement(XmlElement signatureElement, string xpath, XmlInsertionOptions insertionOption)

Parâmetros

NomeTipoDescrição
signatureElementXmlElement
xpathstring
insertionOptionXmlInsertionOptions

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

NomeTipoDescrição
idResolutionTableXmlIdResolutionTable

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

NomeTipoDescrição
elementIdstringThe 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

NomeTipoDescrição
xpathstringThe XPath for selecting to sign element with ID
namespaceManNamespaceManagerNamespaces and prefixed on XPath string, if needed

SetToSignEntityTransferData(byte[])

protected override void SetToSignEntityTransferData(byte[] transferData)

Parâmetros

NomeTipoDescrição
transferDatabyte[]

VerifyParameters(bool)

protected override void VerifyParameters(bool computeSignature)

Parâmetros

NomeTipoDescrição
computeSignaturebool

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()