Class SignatureConfiguration
The signature configuration
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether to add a trusted time-stamp to the signature (Getter)The message digest algorithm (Getter)The format (encoding) of the cryptographic signature (Getter)The padding type of the cryptographic signature (Getter)Whether to add validation information (LTV) (Getter)voidsetAddTimestamp(boolean value) Whether to add a trusted time-stamp to the signature (Setter)voidsetHashAlgorithm(HashAlgorithm value) The message digest algorithm (Setter)voidThe format (encoding) of the cryptographic signature (Setter)voidThe padding type of the cryptographic signature (Setter)voidWhether to add validation information (LTV) (Setter)Methods inherited from class com.pdftools.sign.SignatureConfiguration
getAppearance, getContactInfo, getFieldName, getLocation, getName, getReason, setAppearance, setContactInfo, setFieldName, setLocation, setReasonMethods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
Method Details
-
getHashAlgorithm
The message digest algorithm (Getter)
The algorithm used to hash the document and from which the cryptographic signature is created.
Default:
pdftools.crypto.HashAlgorithm.SHA256 -
setHashAlgorithm
The message digest algorithm (Setter)
The algorithm used to hash the document and from which the cryptographic signature is created.
Default:
pdftools.crypto.HashAlgorithm.SHA256- Throws:
IllegalArgumentException- If the value is invalid or not supported.IllegalArgumentException- ifvalueisnull
-
getSignaturePaddingType
The padding type of the cryptographic signature (Getter)
Default:pdftools.crypto.SignaturePaddingType.RSA_SSA_PSSfor RSA and forpdftools.crypto.SignaturePaddingType.DEFAULTECDSA certificates. -
setSignaturePaddingType
The padding type of the cryptographic signature (Setter)
Default:pdftools.crypto.SignaturePaddingType.RSA_SSA_PSSfor RSA and forpdftools.crypto.SignaturePaddingType.DEFAULTECDSA certificates.- Throws:
IllegalArgumentException- If the value is invalid or not supported.IllegalArgumentException- ifvalueisnull
-
getSignatureFormat
The format (encoding) of the cryptographic signature (Getter)
Default:pdftools.crypto.SignatureFormat.ETSI_CADES_DETACHED -
setSignatureFormat
The format (encoding) of the cryptographic signature (Setter)
Default:pdftools.crypto.SignatureFormat.ETSI_CADES_DETACHED- Throws:
IllegalArgumentException- ifvalueisnull
-
getAddTimestamp
public boolean getAddTimestamp()Whether to add a trusted time-stamp to the signature (Getter)
If
truetheProvider.getTimestampUrl()must be set.Default:
false -
setAddTimestamp
public void setAddTimestamp(boolean value) Whether to add a trusted time-stamp to the signature (Setter)
If
truetheProvider.getTimestampUrl()must be set.Default:
false -
getValidationInformation
Whether to add validation information (LTV) (Getter)
For signing certificates that do not offer validation (revocation) information (OCSP or CRL), this property is ignored.
If downloading validation information fails, an error
NotFoundExceptionorHttpExceptionis generated. Seepdftools.sign.WarningCategory.ADD_VALIDATION_INFORMATION_FAILEDfor a description of possible error causes and solutions.Default:
pdftools.crypto.ValidationInformation.EMBED_IN_DOCUMENTif the signing certificate offers validation information andpdftools.crypto.ValidationInformation.NONEotherwise -
setValidationInformation
Whether to add validation information (LTV) (Setter)
For signing certificates that do not offer validation (revocation) information (OCSP or CRL), this property is ignored.
If downloading validation information fails, an error
NotFoundExceptionorHttpExceptionis generated. Seepdftools.sign.WarningCategory.ADD_VALIDATION_INFORMATION_FAILEDfor a description of possible error causes and solutions.Default:
pdftools.crypto.ValidationInformation.EMBED_IN_DOCUMENTif the signing certificate offers validation information andpdftools.crypto.ValidationInformation.NONEotherwise- Throws:
IllegalArgumentException- ifvalueisnull
-