Eneko González Benito wrote:
So if the client has to create the hash, i need to send the full PDF, correct?
This creates the hash:
byte[] content = streamToByteArray(sap.getRangeStream());
byte[] hash = MessageDigest.getInstance("SHA-1").digest(content);
It could be done on serverside.This signs the hash: byte[] signatureBytes = scd.generateNonRepudiationSignature(hash); In your case this has to be done on client side. (code taken from p623 from my book.)
When you say 'sign', do you mean 'calculate the hash, sign, and resend the PDF'?Why don't you sign the PDF on client side?
I'd do everything on client side, yes. But if you think it's easier to do part on the server side, part on the client side, you can always try that. br, Bruno
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
