class HexaPDF::Type::Signature

Parent

Represents a digital signature that is used to authenticate a user and the contents of the document.

Signature Verification

Verification of signatures is a complex topic and what counts as completely verified may differ from use-case to use-case. Therefore HexaPDF provides as much diagnostic information as possible so that the user can decide whether a signature is valid.

By defining a custom signature handler one is able to also customize the signature verification.

See: PDF1.7 s12.8.1, PDF2.0 s12.8.1, HexaPDF::Type::AcroForm::SignatureField

Field Definitions

NameType/Allowed ValuesRequiredDefault Value
TypeSymbol
One of: :Sig, :DocTimeStamp
false:Sig
FilterSymbolfalsenil
SubFilterSymbolfalsenil
ContentsHexaPDF::DictionaryFields::PDFByteString or Stringfalsenil
CertHexaPDF::PDFArray or HexaPDF::DictionaryFields::PDFByteString or Array or Stringfalsenil
ByteRangeHexaPDF::PDFArray or Arrayfalsenil
ReferenceHexaPDF::PDFArray or Arrayfalsenil
ChangesHexaPDF::PDFArray or Arrayfalsenil
NameStringfalsenil
MHexaPDF::DictionaryFields::PDFDate or String or Time or Date or DateTimefalsenil
LocationStringfalsenil
ReasonStringfalsenil
ContactInfoStringfalsenil
RIntegerfalsenil
VIntegerfalse0
Prop_BuildHexaPDF::Dictionary or Hashfalsenil
Prop_AuthTimeIntegerfalsenil
Prop_AuthTypeSymbol
One of: :PIN, :Password, :Fingerprint
falsenil

Public Instance Methods

contents()

Returns the raw signature value.

signature_handler()

Returns the signature handler for this signature based on the /SubFilter entry.

signature_type()

Returns the signature type based on the /SubFilter.

signed_data()

Returns the signed data as indicated by the /ByteRange entry as byte string.

signer_name()

Returns the name of the person or authority that signed the document.

signing_location()

Returns the location of the signing.

signing_reason()

Returns the reason for the signing.

signing_time()

Returns the time of the signing.

verify(default_paths: true, trusted_certs: [], allow_self_signed: false)

Returns a VerificationResult object with the verification information.