public class SignatureConfiguration extends SignatureConfiguration
Modifier and Type | Method | Description |
---|---|---|
boolean |
getAddTimestamp() |
Whether to add a trusted time-stamp to the signature (Getter)
|
HashAlgorithm |
getHashAlgorithm() |
The message digest algorithm (Getter)
|
SignatureFormat |
getSignatureFormat() |
The format (encoding) of the cryptographic signature (Getter)
|
SignaturePaddingType |
getSignaturePaddingType() |
The padding type of the cryptographic signature (Getter)
|
ValidationInformation |
getValidationInformation() |
Whether to add validation information (LTV) (Getter)
|
void |
setAddTimestamp(boolean value) |
Whether to add a trusted time-stamp to the signature (Setter)
|
void |
setHashAlgorithm(HashAlgorithm value) |
The message digest algorithm (Setter)
|
void |
setSignatureFormat(SignatureFormat value) |
The format (encoding) of the cryptographic signature (Setter)
|
void |
setSignaturePaddingType(SignaturePaddingType value) |
The padding type of the cryptographic signature (Setter)
|
void |
setValidationInformation(ValidationInformation value) |
Whether to add validation information (LTV) (Setter)
|
equals, hashCode
getClass, notify, notifyAll, toString, wait, wait, wait
getContactInfo, getFieldName, getLocation, getName, getReason, setContactInfo, setFieldName, setLocation, setReason
public HashAlgorithm getHashAlgorithm()
The algorithm used to hash the document and from which the cryptographic signature is created.
Default: pdftools.crypto.HashAlgorithm.SHA256
public void setHashAlgorithm(HashAlgorithm value)
The algorithm used to hash the document and from which the cryptographic signature is created.
Default: pdftools.crypto.HashAlgorithm.SHA256
java.lang.IllegalArgumentException
- If the value is invalid or not supported.java.lang.IllegalArgumentException
- if value
is null
public SignaturePaddingType getSignaturePaddingType()
pdftools.crypto.SignaturePaddingType.RSA_SSA_PSS
for RSA and for pdftools.crypto.SignaturePaddingType.DEFAULT
ECDSA certificates.public void setSignaturePaddingType(SignaturePaddingType value)
pdftools.crypto.SignaturePaddingType.RSA_SSA_PSS
for RSA and for pdftools.crypto.SignaturePaddingType.DEFAULT
ECDSA certificates.java.lang.IllegalArgumentException
- If the value is invalid or not supported.java.lang.IllegalArgumentException
- if value
is null
public SignatureFormat getSignatureFormat()
pdftools.crypto.SignatureFormat.ETSI_CADES_DETACHED
public void setSignatureFormat(SignatureFormat value)
pdftools.crypto.SignatureFormat.ETSI_CADES_DETACHED
java.lang.IllegalArgumentException
- if value
is null
public boolean getAddTimestamp()
If true
the Provider.getTimestampUrl()
must be set.
Default: false
public void setAddTimestamp(boolean value)
If true
the Provider.getTimestampUrl()
must be set.
Default: false
public ValidationInformation getValidationInformation()
For signing certificates that do not offer validation (revocation) information (OCSP or CRL), this property is ignored.
If downloading validation information fails, an error NotFoundException
or HttpException
is generated.
See pdftools.sign.WarningCategory.ADD_VALIDATION_INFORMATION_FAILED
for a description of possible error causes
and solutions.
Default: pdftools.crypto.ValidationInformation.EMBED_IN_DOCUMENT
if the signing certificate offers validation information and pdftools.crypto.ValidationInformation.NONE
otherwise
public void setValidationInformation(ValidationInformation value)
For signing certificates that do not offer validation (revocation) information (OCSP or CRL), this property is ignored.
If downloading validation information fails, an error NotFoundException
or HttpException
is generated.
See pdftools.sign.WarningCategory.ADD_VALIDATION_INFORMATION_FAILED
for a description of possible error causes
and solutions.
Default: pdftools.crypto.ValidationInformation.EMBED_IN_DOCUMENT
if the signing certificate offers validation information and pdftools.crypto.ValidationInformation.NONE
otherwise
java.lang.IllegalArgumentException
- if value
is null