Rocco David,

the sample now so often referred to contains that separate static method
SignMsg which encapsulates the actual CMS signature container creation.
Obviously you can exchange it with any implementation of that task using a
security library of your choice as long as it works according to the
parameters given.

I think, though, that System.Security.Cryptography is as capable as any
other such library to create a SHA2-based signature.

Maybe you should address the problem the other way around. Write some code
which can create a CMS signature container with a SHA2 signature for a
byte[] using your smart card and then insert that very code in the SignMsg
method.

Regards,   Michael

PS: Obviously afterwards some more optimization work is necessary. Holding
the whole file as byte[] in memory is not a good idea in production
environments after all.

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Problem-to-sign-using-Sha256-tp4471288p4492769.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
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