|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.crionics.jpdf.signer.CustomSigner
public abstract class CustomSigner
Provides the set of methods for use when the PDF signature needs to be
generated from the external device such as a smartcard, a hardware signer or
a custom signature implementation.
The pseudo code below shows how jPDF calls the different methods
PREPARATION PHASE:
getFilter()
getSubFilter()
getSignatureSize()
getCertificateChain()
reset(); for each bytes of the file to sign update(byte)
GENERATION PHASE
reset();
for each bytes of the file part of the signature calculation
update(byte)
getSignature()
| Constructor Summary | |
|---|---|
CustomSigner()
|
|
| Method Summary | |
|---|---|
byte[] |
createPKCS7(java.lang.String hashAlgo,
byte[] signedDigest,
java.security.cert.X509Certificate[] certificateChain)
Helper method which create a standard PKCS7 object from the attributes. |
abstract java.security.cert.X509Certificate[] |
getCertificateChain()
Returns the list of certificate chain. |
java.util.Calendar |
getCurrentDate()
This method is used to fill the signature modification date. |
java.lang.String |
getFilter()
return the name of the signature handler, this information can be changed if you need to implement your own signature handler. |
abstract byte[] |
getSignature()
Returns the signature value, result of the calculation. |
abstract int |
getSignatureSize()
This method is called during the signature preparation phase. |
java.lang.String |
getSubFilter()
return the name of the signature type as specified in the PDF Spec By default this method returns "adbe.pkcs7.detached" |
abstract void |
reset()
Resets the underlying signer - by resetting the signature to their initial values. |
abstract void |
update(byte data)
Updates the signature calculation with the given data. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CustomSigner()
| Method Detail |
|---|
public byte[] createPKCS7(java.lang.String hashAlgo,
byte[] signedDigest,
java.security.cert.X509Certificate[] certificateChain)
throws java.security.NoSuchAlgorithmException
hashAlgo - signedDigest - certificateChain -
java.security.NoSuchAlgorithmExceptionpublic abstract java.security.cert.X509Certificate[] getCertificateChain()
public java.util.Calendar getCurrentDate()
public java.lang.String getFilter()
public abstract byte[] getSignature()
throws java.security.SignatureException
java.security.SignatureException
public abstract int getSignatureSize()
throws java.security.SignatureException
java.security.SignatureExceptionpublic java.lang.String getSubFilter()
public abstract void reset()
throws java.security.InvalidKeyException,
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.NoSuchAlgorithmException
public abstract void update(byte data)
throws java.security.SignatureException
data -
java.security.SignatureException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||