Elias,

Elias_iText wrote
> Is some like that?

That indeed looks like code with which you extract signature objects from
the signature dictionary. Now you have to dig into this signature object to
retrieve the hash bytes.

Elias_iText wrote
> I have a PDF document, with 2 or 3 signatures. I wish externally store the
> hash of each signature for future third part validation, if applicable.

What third party tools do you have in your mind? What can they do and what
not? As you want to extract the hashes for them, they seem to be
PDF-agnostic (otherwise they could easily extract those hashes themselves).
But what can such a third-party tool do with but a hash value? For checking
the hash it would have to know the byte ranges in the PDF the hash was
calculated for, but how could a PDF-agnostic tool know those ranges.

Or should those third party tools check certificates etc? In that case you
would not need the naked hash values but instead at least the signature
containers (in case of CMS/CAdES style signatures) or many of the signature
dictionary entries (in case of naked PKCS#1 style signatures). If long term
validation information also should be taken into account, that information
also has to be extracted.

If also document or field MDP should be verified, you hardly can use
PDF-agnostic tools.

So, what do you want to do?

Regards,   Michael



--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/How-to-get-the-HASH-from-a-signature-tp4655996p4656001.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
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