public abstract class PdfSigGenericPKCS extends PdfSignature
Modifier and Type | Class and Description |
---|---|
static class |
PdfSigGenericPKCS.PPKLite
Creates a standard filter of the type self signed.
|
static class |
PdfSigGenericPKCS.PPKMS
Creates a standard filter of the type Windows Certificate.
|
static class |
PdfSigGenericPKCS.VeriSign
Creates a standard filter of the type VeriSign.
|
Modifier and Type | Field and Description |
---|---|
protected String |
hashAlgorithm
The hash algorithm, for example "SHA1"
|
protected String |
name
The subject name in the signing certificate (the element "CN")
|
protected PdfPKCS7 |
pkcs
The class instance that calculates the PKCS#1 and PKCS#7
|
protected String |
provider
The crypto provider
|
Constructor and Description |
---|
PdfSigGenericPKCS(PdfName filter,
PdfName subFilter)
Creates a generic standard filter.
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Gets the subject name in the signing certificate (the element "CN")
|
PdfPKCS7 |
getSigner()
Gets the class instance that does the actual signing.
|
byte[] |
getSignerContents()
Gets the signature content.
|
void |
setExternalDigest(byte[] digest,
byte[] RSAdata,
String digestEncryptionAlgorithm)
Sets the digest/signature to an external calculated value.
|
void |
setSignInfo(PrivateKey privKey,
Certificate[] certChain,
CRL[] crlList)
Sets the crypto information to sign.
|
setByteRange, setCert, setContact, setContents, setDate, setLocation, setName, setReason
contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size, toPdf, toString
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
protected String hashAlgorithm
protected String provider
protected PdfPKCS7 pkcs
protected String name
public void setSignInfo(PrivateKey privKey, Certificate[] certChain, CRL[] crlList)
privKey
- the private keycertChain
- the certificate chaincrlList
- the certificate revocation list. It can be null
public void setExternalDigest(byte[] digest, byte[] RSAdata, String digestEncryptionAlgorithm)
digest
- the digest. This is the actual signatureRSAdata
- the extra data that goes into the data tag in PKCS#7digestEncryptionAlgorithm
- the encryption algorithm. It may must be null
if the digest
is also null
. If the digest
is not null
then it may be "RSA" or "DSA"public String getName()
public PdfPKCS7 getSigner()
public byte[] getSignerContents()
Copyright © 2018. All rights reserved.