public class IAIKSignatureImplementation
extends java.lang.Object
implements org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface
Constructor and Description |
---|
IAIKSignatureImplementation(java.security.PrivateKey privKey,
iaik.x509.X509Certificate[] certChain,
PdfSignatureParameters params,
int signedDataMode)
Constructor taking all settings for creating the CMS signature.
|
IAIKSignatureImplementation(java.lang.String tsaUrl,
java.lang.String username,
java.lang.String password,
java.lang.String digestAlgorithm)
Constructor taking all settings for creating the document timestamp.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
sign(java.io.InputStream content)
Digest the document data to be signed and create the CMS signature or document timestamp.
|
public IAIKSignatureImplementation(java.security.PrivateKey privKey, iaik.x509.X509Certificate[] certChain, PdfSignatureParameters params, int signedDataMode)
privKey
- the private key used to sign the data.certChain
- corresponding certificate chain to include in the CMS signatureparams
- parameters defining some signature propertiessignedDataMode
- SignedData.IMPLICIT or SignedData.EXPLICITpublic IAIKSignatureImplementation(java.lang.String tsaUrl, java.lang.String username, java.lang.String password, java.lang.String digestAlgorithm)
tsaUrl
- URL of the timestamp authorityusername
- username for authorizationpassword
- password for authorizationpublic byte[] sign(java.io.InputStream content) throws org.apache.pdfbox.exceptions.SignatureException, java.io.IOException
sign
in interface org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface
org.apache.pdfbox.exceptions.SignatureException
java.io.IOException