Class SignatureConfiguration
- java.lang.Object
-
- com.pdftools.internal.NativeBase
-
- com.pdftools.internal.NativeObject
-
- com.pdftools.sign.SignatureConfiguration
-
- com.pdftools.crypto.providers.builtin.SignatureConfiguration
-
public class SignatureConfiguration extends SignatureConfiguration
The signature configuration
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetAddTimestamp()Whether to add a trusted time-stamp to the signature (Getter)HashAlgorithmgetHashAlgorithm()The message digest algorithm (Getter)SignatureFormatgetSignatureFormat()The format (encoding) of the cryptographic signature (Getter)SignaturePaddingTypegetSignaturePaddingType()The padding type of the cryptographic signature (Getter)ValidationInformationgetValidationInformation()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)voidsetSignatureFormat(SignatureFormat value)The format (encoding) of the cryptographic signature (Setter)voidsetSignaturePaddingType(SignaturePaddingType value)The padding type of the cryptographic signature (Setter)voidsetValidationInformation(ValidationInformation value)Whether to add validation information (LTV) (Setter)-
Methods inherited from class com.pdftools.sign.SignatureConfiguration
getAppearance, getContactInfo, getFieldName, getLocation, getName, getReason, setAppearance, setContactInfo, setFieldName, setLocation, setReason
-
Methods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
getHashAlgorithm
public HashAlgorithm 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
public void setHashAlgorithm(HashAlgorithm value)
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:
java.lang.IllegalArgumentException- If the value is invalid or not supported.java.lang.IllegalArgumentException- ifvalueisnull
-
getSignaturePaddingType
public SignaturePaddingType getSignaturePaddingType()
The padding type of the cryptographic signature (Getter)
Default:pdftools.crypto.SignaturePaddingType.RSA_SSA_PSSfor RSA and forpdftools.crypto.SignaturePaddingType.DEFAULTECDSA certificates.
-
setSignaturePaddingType
public void setSignaturePaddingType(SignaturePaddingType value)
The padding type of the cryptographic signature (Setter)
Default:pdftools.crypto.SignaturePaddingType.RSA_SSA_PSSfor RSA and forpdftools.crypto.SignaturePaddingType.DEFAULTECDSA certificates.- Throws:
java.lang.IllegalArgumentException- If the value is invalid or not supported.java.lang.IllegalArgumentException- ifvalueisnull
-
getSignatureFormat
public SignatureFormat getSignatureFormat()
The format (encoding) of the cryptographic signature (Getter)
Default:pdftools.crypto.SignatureFormat.ETSI_CADES_DETACHED
-
setSignatureFormat
public void setSignatureFormat(SignatureFormat value)
The format (encoding) of the cryptographic signature (Setter)
Default:pdftools.crypto.SignatureFormat.ETSI_CADES_DETACHED- Throws:
java.lang.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
public ValidationInformation 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
public void setValidationInformation(ValidationInformation value)
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:
java.lang.IllegalArgumentException- ifvalueisnull
-
-