Class SignatureConfiguration
- java.lang.Object
-
- com.pdftools.internal.NativeBase
-
- com.pdftools.internal.NativeObject
-
- com.pdftools.sign.SignatureConfiguration
-
- com.pdftools.crypto.providers.swisscomsigsrv.SignatureConfiguration
-
public class SignatureConfiguration extends SignatureConfiguration
The signature configuration
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getAddTimestamp()
Whether to add a trusted time-stamp to the signature (Getter)boolean
getEmbedValidationInformation()
Whether to embed validation information into the signature (LTV) (Getter)HashAlgorithm
getHashAlgorithm()
The message digest algorithm (Getter)SignatureFormat
getSignatureFormat()
The format (encoding) of the cryptographic signature (Getter)void
setAddTimestamp(boolean value)
Whether to add a trusted time-stamp to the signature (Setter)void
setEmbedValidationInformation(boolean value)
Whether to embed validation information into the signature (LTV) (Setter)void
setHashAlgorithm(HashAlgorithm value)
The message digest algorithm (Setter)void
setSignatureFormat(SignatureFormat value)
The format (encoding) of the cryptographic signature (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
- ifvalue
isnull
-
getSignatureFormat
public SignatureFormat getSignatureFormat()
The format (encoding) of the cryptographic signature (Getter)
Default:pdftools.crypto.SignatureFormat.ADBE_PKCS7_DETACHED
-
setSignatureFormat
public void setSignatureFormat(SignatureFormat value)
The format (encoding) of the cryptographic signature (Setter)
Default:pdftools.crypto.SignatureFormat.ADBE_PKCS7_DETACHED
- Throws:
java.lang.IllegalArgumentException
- If the value is invalid or not supported.java.lang.IllegalArgumentException
- ifvalue
isnull
-
getAddTimestamp
public boolean getAddTimestamp()
Whether to add a trusted time-stamp to the signature (Getter)
Default:false
-
setAddTimestamp
public void setAddTimestamp(boolean value)
Whether to add a trusted time-stamp to the signature (Setter)
Default:false
-
getEmbedValidationInformation
public boolean getEmbedValidationInformation()
Whether to embed validation information into the signature (LTV) (Getter)
-
true
: Create an LTV signature by embedding validation information (seepdftools.crypto.ValidationInformation.EMBED_IN_SIGNATURE
). This value is only supported, if thegetSignatureFormat()
ispdftools.crypto.SignatureFormat.ADBE_PKCS7_DETACHED
. LTV signatures for other formats can be created by adding validation information to the signed document (seepdftools.sign.Signer.process
andpdftools.sign.OutputOptions.getAddValidationInformation
). -
false
: Create a basic signature without validation information (seepdftools.crypto.ValidationInformation.NONE
).
Default:
true
-
-
setEmbedValidationInformation
public void setEmbedValidationInformation(boolean value)
Whether to embed validation information into the signature (LTV) (Setter)
-
true
: Create an LTV signature by embedding validation information (seepdftools.crypto.ValidationInformation.EMBED_IN_SIGNATURE
). This value is only supported, if thegetSignatureFormat()
ispdftools.crypto.SignatureFormat.ADBE_PKCS7_DETACHED
. LTV signatures for other formats can be created by adding validation information to the signed document (seepdftools.sign.Signer.process
andpdftools.sign.OutputOptions.getAddValidationInformation
). -
false
: Create a basic signature without validation information (seepdftools.crypto.ValidationInformation.NONE
).
Default:
true
-
-
-