Andrea, AndreaC. wrote: > Obviously the t1 HASH should be calculated from the PDF where signature > was striped out. > So the question is, how can I calculate that t1 time HASH?
As Paulo already said, signing may change the PDF considerably, e.g. reorganize the file, throw away unused portions, etc., which would make your task impossible. OTOH, if the signing process can be limited to sign in append-mode, the original PDF remains a starting segment of the signed version. In that case (especially if at t0 you can not only store the current hash but also the current size) you can simply compare the hash value of that starting segment of the file at t1 with the original hash. The obvious downside, though --- you do not know which additions have been introduced in append mode: in spite of containing the original file as prior revision, the new file might look completely different. All you know is that the original file was a former revision of the file at t1. The signing process, btw, can be limited to sign in append mode either directly if you control the signing software, or indirectly if you control the original PDF files: If the AppendOnly flag of the Signature flags of the interactive form dictionary of the original PDF is set, signing applications may see this as a hint that they should sign in append mode only. Regards, Michael. -- View this message in context: http://itext-general.2136553.n4.nabble.com/HASH-of-PDF-strip-out-of-signature-tp3859233p3859322.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net 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