Robert,

RobertQ wrote:
> 
>> Then is there any way to verify a PDF signature using iText???
>> 
>> 
>> iText allows you to extract both the signature container and the signed
>> data stream for each signature. Without too much hassle you can thus
>> verify the PDF signatures using a crypto library of your choice.
>> 
>> Regards, Michael.
>> 
> Quoted from: 
> http://www.nabble.com/Verifying-signature%21%21-NoSuchAlgorithmException%3A-1.2.840.113549.1.1.1-tp23673079p23683498.html
> 
> I know how to verify a signature by using a crypto library.But how can I
> extract the signature container and the signed data stream for each
> siganture. Could you show me some example of the code.
> 

Use the AcroFields methods getSignatureNames and getSignatureDictionary. The
latter dictionary contains the signature container (key: PdfName.CONTENTS,
apply getOriginalBytes) and the range data (key: PdfName.BYTERANGE). Use
something like the class PdfSignatureAppearance.RangeStream to extract the
signed data.

Regards,   Mikel.
-- 
View this message in context: 
http://www.nabble.com/Verifying-signature%21%21-NoSuchAlgorithmException%3A-1.2.840.113549.1.1.1-tp23673079p23777566.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to