pdftools_sdk.crypto.providers.swisscom_sig_srv.signature_configuration

Classes

SignatureConfiguration(handle)

The signature configuration

class pdftools_sdk.crypto.providers.swisscom_sig_srv.signature_configuration.SignatureConfiguration(handle)[source]

Bases: SignatureConfiguration

The signature configuration

property hash_algorithm: HashAlgorithm

The message digest algorithm

The algorithm used to hash the document and from which the cryptographic signature is created.

Default: pdftools_sdk.crypto.hash_algorithm.HashAlgorithm.SHA256

Returns:

HashAlgorithm

property signature_format: SignatureFormat

The format (encoding) of the cryptographic signature

Default: pdftools_sdk.crypto.signature_format.SignatureFormat.ADBEPKCS7DETACHED

Returns:

SignatureFormat

property add_timestamp: bool

Whether to add a trusted time-stamp to the signature

Default: False

Returns:

bool

property embed_validation_information: bool

Whether to embed validation information into the signature (LTV)

  • True: Create an LTV signature by embedding validation information

(see pdftools_sdk.crypto.validation_information.ValidationInformation.EMBEDINSIGNATURE). This value is only supported, if the pdftools_sdk.crypto.providers.swisscom_sig_srv.signature_configuration.SignatureConfiguration.signature_format is pdftools_sdk.crypto.signature_format.SignatureFormat.ADBEPKCS7DETACHED. LTV signatures for other formats can be created by adding validation information to the signed document (see pdftools_sdk.sign.signer.Signer.process and pdftools_sdk.sign.output_options.OutputOptions.add_validation_information).

  • False: Create a basic signature without validation information (see pdftools_sdk.crypto.validation_information.ValidationInformation.NONE).

Default: True

Returns:

bool