Show / Hide Table of Contents
Editar no GitHub

Class PadesSigner

Class for creating PAdES signatures

Inheritance
Object
PadesSigner
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Lacuna.Pki.Pades
Assembly: Lacuna.Pki.dll
Syntax
public class PadesSigner

Constructors

| Improve this Doc View Source

PadesSigner()

Declaration
public PadesSigner()

Properties

| Improve this Doc View Source

ValidationResults

Declaration
public ValidationResults ValidationResults { get; }
Property Value
Type Description
ValidationResults

Methods

| Improve this Doc View Source

AddAttributeCertificate(AttributeCertificate)

Declaration
public void AddAttributeCertificate(AttributeCertificate attributeCertificate)
Parameters
Type Name Description
AttributeCertificate attributeCertificate
| Improve this Doc View Source

AddMetadata(String, String)

Adds a PDF metdata key and value

Declaration
public void AddMetadata(string key, string value)
Parameters
Type Name Description
String key

Metadata key

String value

Metadata value

| Improve this Doc View Source

ComputeSignature()

Declaration
public void ComputeSignature()
| Improve this Doc View Source

GetPadesSignature()

Declaration
public byte[] GetPadesSignature()
Returns
Type Description
Byte[]
| Improve this Doc View Source

GetToSignBytes(out SignatureAlgorithm, out Byte[])

Declaration
public byte[] GetToSignBytes(out SignatureAlgorithm signatureAlgorithm, out byte[] transferData)
Parameters
Type Name Description
SignatureAlgorithm signatureAlgorithm
Byte[] transferData
Returns
Type Description
Byte[]
| Improve this Doc View Source

SetCertificateStore(ICertificateStore)

Declaration
public void SetCertificateStore(ICertificateStore certStore)
Parameters
Type Name Description
ICertificateStore certStore
| Improve this Doc View Source

SetCertificateValidationConfigurator(Action<CertificateValidationOptions>)

Sets an action for configuring the signer certificate validation

Declaration
public void SetCertificateValidationConfigurator(Action<CertificateValidationOptions> configureCertificateValidation)
Parameters
Type Name Description
Action<CertificateValidationOptions> configureCertificateValidation
| Improve this Doc View Source

SetCertificationLevel(PadesCertificationLevel)

Declaration
public void SetCertificationLevel(PadesCertificationLevel certLevel)
Parameters
Type Name Description
PadesCertificationLevel certLevel
| Improve this Doc View Source

SetCommitmentType(CommitmentType)

Sets the signer commitment type signed attribute

Declaration
public void SetCommitmentType(CommitmentType commitmentType)
Parameters
Type Name Description
CommitmentType commitmentType
| Improve this Doc View Source

SetCustomSignatureFieldName(String)

(Optional) Sets a custom signature unique field name. Default is "SignatureX" where X is incremental on each signer starting at 1.

Declaration
public void SetCustomSignatureFieldName(string name)
Parameters
Type Name Description
String name
| Improve this Doc View Source

SetLocation(String)

(Optional) Sets the PDF signing location. The CPU host name or physical location of the signing.

Declaration
public void SetLocation(string location)
Parameters
Type Name Description
String location
| Improve this Doc View Source

SetPdfToSign(Byte[])

Declaration
public void SetPdfToSign(byte[] content)
Parameters
Type Name Description
Byte[] content
| Improve this Doc View Source

SetPdfToSign(Stream)

Declaration
public void SetPdfToSign(Stream stream)
Parameters
Type Name Description
Stream stream
| Improve this Doc View Source

SetPdfToSign(String)

Declaration
public void SetPdfToSign(string path)
Parameters
Type Name Description
String path
| Improve this Doc View Source

SetPolicy(IPadesPolicyMapper)

Declaration
public void SetPolicy(IPadesPolicyMapper mapper)
Parameters
Type Name Description
IPadesPolicyMapper mapper
| Improve this Doc View Source

SetPolicy(PadesPolicySpec)

Declaration
public void SetPolicy(PadesPolicySpec policy)
Parameters
Type Name Description
PadesPolicySpec policy
| Improve this Doc View Source

SetPreComputedSignature(Byte[], Byte[])

Sets pre-computed signature from the client. Used in a remote key signature

Declaration
public void SetPreComputedSignature(byte[] signature, byte[] padesTransferData)
Parameters
Type Name Description
Byte[] signature
Byte[] padesTransferData
| Improve this Doc View Source

SetReason(String)

(Optional) Sets the PDF signing reason field

Declaration
public void SetReason(string reason)
Parameters
Type Name Description
String reason
| Improve this Doc View Source

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

Declaration
public void SetSignerName(string name)
Parameters
Type Name Description
String name
| Improve this Doc View Source

SetSigningCertificate(PKCertificate)

Declaration
public void SetSigningCertificate(PKCertificate certificate)
Parameters
Type Name Description
PKCertificate certificate
| Improve this Doc View Source

SetSigningCertificate(PKCertificateWithKey)

Declaration
public void SetSigningCertificate(PKCertificateWithKey certificate)
Parameters
Type Name Description
PKCertificateWithKey certificate
| Improve this Doc View Source

SetTimestampRequester(ITimestampRequester)

Declaration
public void SetTimestampRequester(ITimestampRequester tsRequester)
Parameters
Type Name Description
ITimestampRequester tsRequester
| Improve this Doc View Source

SetUseRandomAccessArrayMethod(Boolean)

Use in case of huge PDF files passed as byte array

Declaration
public void SetUseRandomAccessArrayMethod(bool useRandomAccessMethod)
Parameters
Type Name Description
Boolean useRandomAccessMethod
| Improve this Doc View Source

SetVisualRepresentation(PadesVisualRepresentation)

Declaration
[Obsolete("Use SetVisualRepresentation(PadesVisualSignature2 visualRepresentation) instead")]
public void SetVisualRepresentation(PadesVisualRepresentation visualRepresentation)
Parameters
Type Name Description
PadesVisualRepresentation visualRepresentation
| Improve this Doc View Source

SetVisualRepresentation(PadesVisualRepresentation2)

Declaration
public void SetVisualRepresentation(PadesVisualRepresentation2 visualRepresentation)
Parameters
Type Name Description
PadesVisualRepresentation2 visualRepresentation
| Improve this Doc View Source

VerifyParameters(Boolean)

Verifies if PadesSigner necessary parameters are set. If not, throws Exception.

Declaration
public void VerifyParameters(bool computingSignature = false)
Parameters
Type Name Description
Boolean computingSignature

Whether or not you will call the ComputeSignature() method to complete the siganture process in this step.

Back to top Copyright © 2015-2020 Lacuna Software