PadesSigner
Namespace: Lacuna.Pki.Pades
Assembly: Lacuna.Pki
Class
Class for creating PAdES signatures
public class PadesSigner
Hierarquia: object → PadesSigner
Construtores
PadesSigner()
public PadesSigner()
Propriedades
ValidationResults
public ValidationResults ValidationResults { get; }
Retorno
Métodos
AddAttributeCertificate(AttributeCertificate)
public void AddAttributeCertificate(AttributeCertificate attributeCertificate)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
attributeCertificate | AttributeCertificate |
AddMetadata(string, string)
Adds a PDF metdata key and value
public void AddMetadata(string key, string value)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
key | string | Metadata key |
value | string | Metadata value |
ComputeSignature()
public void ComputeSignature()
GetPadesSignature()
public byte[] GetPadesSignature()
Retorno
GetToSignBytes(out SignatureAlgorithm, out byte[])
public byte[] GetToSignBytes(out SignatureAlgorithm signatureAlgorithm, out byte[] transferData)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
signatureAlgorithm | SignatureAlgorithm | |
transferData | byte[] |
Retorno
SetCertificateStore(ICertificateStore)
public void SetCertificateStore(ICertificateStore certStore)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
certStore | ICertificateStore |
SetCertificateValidationConfigurator(Action<CertificateValidationOptions>)
Sets an action for configuring the signer certificate validation
public void SetCertificateValidationConfigurator(Action<CertificateValidationOptions> configureCertificateValidation)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
configureCertificateValidation | Action<CertificateValidationOptions> |
SetCertificationLevel(PadesCertificationLevel)
public void SetCertificationLevel(PadesCertificationLevel certLevel)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
certLevel | PadesCertificationLevel |
SetCommitmentType(CommitmentType)
Sets the signer commitment type signed attribute
public void SetCommitmentType(CommitmentType commitmentType)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
commitmentType | CommitmentType |
SetCustomSignatureFieldName(string)
(Optional) Sets a custom signature unique field name. Default is "SignatureX" where X is incremental on each signer starting at 1.
public void SetCustomSignatureFieldName(string name)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
name | string |
SetLocation(string)
(Optional) Sets the PDF signing location. The CPU host name or physical location of the signing.
public void SetLocation(string location)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
location | string |
SetPdfToSign(byte[])
public void SetPdfToSign(byte[] content)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
content | byte[] |
SetPdfToSign(Stream)
public void SetPdfToSign(Stream stream)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
stream | Stream |
SetPdfToSign(string)
public void SetPdfToSign(string path)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
path | string |
SetPolicy(IPadesPolicyMapper)
public void SetPolicy(IPadesPolicyMapper mapper)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
mapper | IPadesPolicyMapper |
SetPolicy(PadesPolicySpec)
public void SetPolicy(PadesPolicySpec policy)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
policy | PadesPolicySpec |
SetPreComputedSignature(byte[], byte[])
Sets pre-computed signature from the client. Used in a remote key signature
public void SetPreComputedSignature(byte[] signature, byte[] padesTransferData)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
signature | byte[] | |
padesTransferData | byte[] |
SetReason(string)
(Optional) Sets the PDF signing reason field
public void SetReason(string reason)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
reason | string |
SetSignerName(string)
(Optional) Sets the PDF signer name. PDF 32000-1:2008: The name of the person or authority signing the document. This value should be used ONLY WHEN it is not possible to extract the name from the signature (From the certificate of the signer.)
public void SetSignerName(string name)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
name | string |
SetSigningCertificate(PKCertificate)
public void SetSigningCertificate(PKCertificate certificate)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
certificate | PKCertificate |
SetSigningCertificate(PKCertificateWithKey)
public void SetSigningCertificate(PKCertificateWithKey certificate)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
certificate | PKCertificateWithKey |
SetTimestampRequester(ITimestampRequester)
public void SetTimestampRequester(ITimestampRequester tsRequester)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
tsRequester | ITimestampRequester |
SetUseRandomAccessArrayMethod(bool)
Use in case of huge PDF files passed as byte array
public void SetUseRandomAccessArrayMethod(bool useRandomAccessMethod)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
useRandomAccessMethod | bool |
SetVisualRepresentation(PadesVisualRepresentation)
[Obsolete("Use SetVisualRepresentation(PadesVisualSignature2 visualRepresentation) instead")]
public void SetVisualRepresentation(PadesVisualRepresentation visualRepresentation)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
visualRepresentation | PadesVisualRepresentation |
SetVisualRepresentation(PadesVisualRepresentation2)
public void SetVisualRepresentation(PadesVisualRepresentation2 visualRepresentation)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
visualRepresentation | PadesVisualRepresentation2 |
VerifyParameters(bool)
Verifies if PadesSigner necessary parameters are set. If not, throws Exception.
public void VerifyParameters(bool computingSignature = false)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
computingSignature | bool | Whether or not you will call the ComputeSignature() method to complete the siganture process in this step. |
Membros herdados
ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()