PDFComputedDigitalSignature¶
Namespace: O2S.Components.PDF4NET.DigitalSignatures
Defines a PDF digital signature loaded from a signed PDF file.
Inheritance Object → PDFBaseDigitalSignature → PDFComputedDigitalSignature
Properties¶
Certificate¶
Gets the sign certificate.
Property Value
X509Certificate2
A that represents the certificate used to sign the document.
ContactInfo¶
Gets or sets the contact information.
Property Value
String
Information provided by the signer to enable a recipient to contact the signer to verify the signature.
Remarks
This property should not be set for PDFDocumentTimeStamp signatures.
CosDictionary¶
Gets the signature dictionary.
Property Value
PDFCosDictionary
The COS signature object for setting custom values for the signature.
Location¶
Gets or sets the location.
Property Value
String
The CPU host name or physical location of the signing.
Remarks
This property should not be set for PDFDocumentTimeStamp signatures.
Name¶
Gets or sets the name.
Property Value
String
The name of the person or authority signing the document.
Remarks
This property should not be set for PDFDocumentTimeStamp signatures.
Reason¶
Gets or sets the sign reason.
Property Value
String
The reason for the signing.
Remarks
This property should not be set for PDFDocumentTimeStamp signatures.
SignatureDate¶
Gets or sets the sign date.
Property Value
DateTime
The date and time when the signature was applied.
SignatureDigestAlgorithm¶
Gets the signature digest algorithm.
Property Value
PDFDigitalSignatureDigestAlgorithm
A PDFDigitalSignatureDigestAlgorithm enum member specifying the digest algorithm used in the computation of the digital signature.
Methods¶
DecodeSignature()¶
Decodes the signature into a hierarchy of ASN.1 objects.
Returns
Asn1Object[]
The hierarchy of ASN.1 objects that compose this signature.
GetRawSignatureData()¶
Gets the raw signature data exactly as it appears in the PDF file.
Returns
String
The exact string COS object that represents the signature data including the string terminators.
GetSignatureData()¶
Gets the raw signature data as it appears in the PDF file.
Returns
Byte[]
The DER encoded signature data as byte array. If the signature string contains invalid HEX characters then the corresponding byte is set to 0.
GetSignedBytes(Stream)¶
Gets the bytes used for creating this signature.
Parameters
signedFile Stream
The input PDF file that was used to create the document from which this signature object was retrieved.
Returns
Byte[]
The array of bytes that were used as input for computing the document digest required for generating this signature.
SaveSignedCopy(Stream, Stream)¶
Saves a copy of the PDF file that is covered by this signature.
Parameters
signedFile Stream
The input PDF file that was used to create the document from which this signature object was retrieved.
output Stream
Destination stream where to save the signed copy.
Remarks
The stream used to create the PDFFixedDocument object from which this signature was retrieved is required as input because the document does not keep a reference to the stream it was created from. Because the digital signatures are computed on the physical layout of the PDF file, it is impossible to recreate this layout from a loaded PDFFixedDocument object.