Gervasio, Gervasio Amy wrote: > But now, you say *"using a good guess of the expected signature size"*... > and my question is: How can I estimate a good size for my signature? And > how can it impact in the resultant pdf?
You seem to use adbe.pkcs7.sha1 format signatures generated using PdfPKCS7 without any extras. So no fancy unexpected additional attributes etc have to be considered. Therefore, you don't have to guess but simply give PdfPKCS7 the only information it is missing --- the fact you are using 1024 bit RSA, not e.g. 2048 bit RSA --- by means of the *new byte[128]* argument of the *sap.setExternalDigest* call (128 bytes being 1024 bits). Otherwise having to guess would mean about 2 bytes excess file size for each excess byte reserved for the signature container. Regards, Michael. PS: Actually you should not use adbe.pkcs7.sha1 format signatures anymore as they require the use of SHA1 for hashing the PDF file byte ranges, an algorithm being considered insecure in more and more contexts. -- View this message in context: http://itext-general.2136553.n4.nabble.com/Re-Using-eToken-with-secondary-authentication-format-tp3772022p3783992.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ 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
