Hello Everyone,

I am digitally signing the PDF using smart card and I am successful in
doing so.

Here are the steps that I have done:

   1. Computing the hash of the PDF using iText
   2. Signing the hash from smart card
   3. Making the CAdES using the above hash and smart card received
   signature
   4. Writing the CAdES into PDF to result as Signed PDF
   5. Verifying the signed PDF (successful)


If I do the all 5 steps in one go, it works perfect.

Problem comes when I *compute the hash again to use in step 3* because of
my business needs.
I checked that if I compute the hash again, the hash value changes.

I assume that while computing hash, iText internally do the signing time
during hash and because of this the value changes.

Any expert can guide how to get the same hash again? Urgent reply is highly
appreciated please.


PS: I have attached the sample code for ease.


Thanks,
Faisal

Attachment: TestPdfHashIssue.java
Description: Binary data

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to