Andy, andyrobb18 wrote > I've picked up the following code from the page indicated; I've used this > example as I'm aware you can't sign SHA256 with WINCER.
In that case I wonder why you try it. You are right, WINCER_SIGNED is ADOBE_PPKMS, thus PdfSigGenericPKCS.PPKMS is used which in turn initializes the subfilter to PdfName.ADBE_PKCS7_SHA1 which as mentioned before implies SHA1 use for document hashing. As also mentioned before, you had better use adbe.pkcs7.detached or ETSI.CAdES.detached; I would suggest starting with SignDetached() from "How to sign with an external signature dictionary using BouncyCastle CMS"; you also might need more reserved space (csize), 4000 Bytes might be a bit small. > At the moment it signs the document, but the signature as invalid when I > check it. See attached > > http://itext-general.2136553.n4.nabble.com/file/n4163557/signedX2.pdf > signedX2.pdf The signature in that document is not generated by the code you supplied. Regards, Michael -- View this message in context: http://itext-general.2136553.n4.nabble.com/iText-SHA-256-signing-tp4125948p4163906.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now! http://www.accelacomm.com/jaw/sfnl/114/51491232/ _______________________________________________ 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