You should ask whoever did the Linux Java why the results are different
between the compiler and the interpreter. I don't see anything for iText
to fix.
Paulo
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Dimiter Nikolov
> Sent: Tuesday, January 16, 2007 12:52 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Problem with calculating hash in IText
>
> I've read the following thread in your mailing list
> archive.
> From: Paulo Soares <[EMAIL PROTECTED]>
> RE: strange signature creation in itext
> 2005-09-28 01:54
> There's nothing strange with that. All te pdfs
> have
> an internal creation
> date and that alone would be enough to get a
> different hash.
>
> -----Original Message-----
> From: Tamas Nemeth
> [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 27, 2005 11:16 PM
> To: [EMAIL PROTECTED]; Paulo Soares
> Subject: strange signature creation in itext
>
> Hi!
>
> I'm trying to create command line pdf signer,
> which creates a signed
> pdf in 2 part. First an external program calls
> me
> to get a hash (my
>
> program creates the hash and gives back to the
> external program), then
> the external program creates a pkcs7 file onto
> that hash and gives
> back to my command line program. After that my
> command line program
> inserts the hash into the pdf file.
> This works good, but sometimes (10:1) I get
> different hash when I
> create hash, and when I try to insert the pkcs7
> file into the pdf.
> As I see iText sometimes creates different pdf
> structure and that is
> why I get different hash values. I can't see the
> logic behind that.
> Can somebody tell meg, why creates iText
> different
> structure
> sometimes. Is there any way to always create the
> same structure (hash)
> onto the same pdf?
>
> I have the same problem. So I don't think the
> problem
> of calculating different hashes is the internal
> creation date because:
> 1. I've tried to put this creation date
> programmatically through the following code:
> Calendar cal = Calendar.getInstance();
> long l = 1156153389444L;
> cal.setTimeInMillis(l);
> sap.setSignDate(cal);
> , so the creation date is the same all the time.
> 2. The problem appears only on Linux(Trustix
> Secure
> Linux 3.0) OS. In Windows it works just fine - the
> hash of given document is equal all times. On
> Linux
> the hash is same all the times only if the java
> interpreter mode is chosen(java -Xint). But then
> it
> works 10 times slower. Java version on both OS :
> jdk 1.5.0_02. IText version: itext-paulo-155.jar.
>
> I hope you can help me fix this problem. Thanks in
> advance!
> Best regards,
> Dimitar
>
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/