public class MakeSignatureIAIK
extends java.lang.Object
Constructor and Description |
---|
MakeSignatureIAIK() |
Modifier and Type | Method and Description |
---|---|
static void |
signDetached(java.lang.String src,
java.lang.String dest,
java.security.cert.Certificate[] chain,
java.security.PrivateKey pk,
java.lang.String digestAlgorithm,
com.itextpdf.text.pdf.security.MakeSignature.CryptoStandard subfilter,
java.lang.String reason,
java.lang.String location,
java.util.Collection<com.itextpdf.text.pdf.security.CrlClient> crlList,
boolean useOCSP,
java.lang.String tsaUrl,
java.lang.String tsaUser,
java.lang.String tsaPw,
int estimatedSize)
Sign the given PDF, saving the signed PDF to given destination.
|
public static void signDetached(java.lang.String src, java.lang.String dest, java.security.cert.Certificate[] chain, java.security.PrivateKey pk, java.lang.String digestAlgorithm, com.itextpdf.text.pdf.security.MakeSignature.CryptoStandard subfilter, java.lang.String reason, java.lang.String location, java.util.Collection<com.itextpdf.text.pdf.security.CrlClient> crlList, boolean useOCSP, java.lang.String tsaUrl, java.lang.String tsaUser, java.lang.String tsaPw, int estimatedSize) throws java.security.GeneralSecurityException, java.io.IOException, PdfSignatureException
src
- path to the PDF document, that shall be signeddest
- path, where the signed PDF document shall be savedchain
- certificates corresponding to given private keypk
- private key, that shall be used for signing the documentdigestAlgorithm
- digest algorithm for digesting document bytessubfilter
- signature subfilter, specifying the signature formatreason
- reason of signature processlocation
- location of signature processcrlList
- CRLs that shall be included in the signatureuseOCSP
- true, if OCSP response shall be included in the signaturetsaUrl
- set to TSA URL,if timestamp shall be added to signature, null otherwisetsaUser
- username to authenticate at TSAtsaPw
- password to authenticate at TSAestimatedSize
- bytes that shall be reserved for the encoded signaturejava.security.GeneralSecurityException
- in case of problems during handling certificates or CRLsjava.io.IOException
- if PDF document can't be readPdfSignatureException
- if PDF signature can't be created