public class Signature extends Object implements org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface
Use your favorite cryptographic library to implement PKCS #7 signature creation. If you want to create the hash and the signature separately (e.g. to transfer only the hash to an external application), read this answer or this answer.
| Constructor and Description |
|---|
Signature(Certificate[] certificateChain,
PrivateKey privateKey) |
Signature(Certificate[] certificateChain,
PrivateKey privateKey,
String _tsaURL) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
sign(InputStream content)
This method will be called from inside of the pdfbox and create the PKCS #7
signature.
|
public Signature(Certificate[] certificateChain, PrivateKey privateKey) throws UnrecoverableKeyException, CertificateNotYetValidException, CertificateExpiredException, KeyStoreException, NoSuchAlgorithmException, IOException
public Signature(Certificate[] certificateChain, PrivateKey privateKey, String _tsaURL) throws KeyStoreException, UnrecoverableKeyException, NoSuchAlgorithmException, IOException, CertificateNotYetValidException, CertificateExpiredException
public byte[] sign(InputStream content) throws IOException
This method is for internal use only.
sign in interface org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterfaceIOExceptionCopyright © 2016–2020 Imixs Software Solutions GmbH. All rights reserved.