Click or drag to resize

PdfSignature Class

A digital signature (PDF 1.3) may be used to authenticate the identity of a user and the document’s contents. It stores information about the signer and the state of the document when it was signed.
Inheritance Hierarchy
SystemObject
  SautinSoft.PdfPdfObject
    SautinSoft.Pdf.FormsPdfSignature

Namespace: SautinSoft.Pdf.Forms
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2024.8.8
Syntax
public sealed class PdfSignature : PdfObject

The PdfSignature type exposes the following members.

Properties
 NameDescription
Public propertyContactInfo

(Optional) Information provided by the signer to enable a recipient to contact the signer to verify the signature.

Example: A phone number.

Public propertyContent

Gets the content of the PdfSignature.

For public-key signatures, Content should be either a DER-encoded PKCS#1 binary data object or a DER-encoded CMS binary data object.

For document timestamp signatures, Content shall be the TimeStampToken as specified in RFC 3161 as updated by RFC 5816. The value of the messageImprint field within the TimeStampToken shall be a hash of the bytes of the document indicated by the ByteRange and the ByteRange shall specify the complete PDF file contents (excepting the Content value).

Public propertyContentsLength Gets or sets the length of the Content (in bytes).
Public propertyDate

(Optional) The time of signing. Depending on the signature handler, this may be a normal unverified computer time or a time generated in a verifiable way from a secure time server.

This value should be used only when the time of signing is not available in the signature.

Example: A time stamp can be embedded in a PKCS#7 binary data object (see 12.8.3.3, "PKCS#7 Signatures as used in ISO 32000").

Public propertyFormat(Optional) A name that describes the encoding of the signature value and key information in the signature dictionary. A PDF processor may use any handler that supports this format to validate the signature.
Public propertyLocation(Optional) The CPU host name or physical location of the signing.
Public propertyLocks

Gets the set of PdfSignatureLocks that specify what changes, made to the document after the signature was applied, invalidate the signature.

If the value is , then the signature does not specify a Reference entry.

To set the Locks, sign the PdfSignatureField with a PdfSigner whose AuthorPermission is not or use any SetLockedFields method before signing on a PdfSignatureField that holds the signature.

Public propertyMetadata(Optional; PDF 1.4) A metadata stream containing metadata for the component.
(Inherited from PdfObject)
Public propertyName

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

Example: From the certificate of the signer.

Public propertyReason(Optional) The reason for the signing, such as ( I agree … ).
Top
Methods
 NameDescription
Public methodComputeHash Computes the hash of the bytes of the document indicated by the ByteRange (the ByteRange should specify the complete PDF file contents, except the Content value) with the specified algorithm.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodValidate

Validates the PdfSignature.

Caution note  Caution
This method validates only that the document has not been modified since the PdfSignature was applied. The signer's identity (its certificate validity and revocation status) is currently not validated.
Top
Extension Methods
 NameDescription
Public Extension MethodGetArray Gets the PdfArray that serves as a backing storage of the specified PdfObject or if no PdfArray serves as a backing storage of the specified PdfObject.
(Defined by PdfObjectExtensions)
Public Extension MethodGetDictionary Gets the PdfDictionary that serves as a backing storage of the specified PdfObject.
(Defined by PdfObjectExtensions)
Public Extension MethodGetOrAddDictionary Gets the PdfDictionary that serves as a backing storage of the specified PdfObject.
(Defined by PdfObjectExtensions)
Top
See Also