|
From: Edwin W. <ed...@wo...> - 2005-12-22 21:44:46
|
--On 22-12-2005 15:47 -0500 Mike Ferraro <mik...@ha...> wrote: > > I think that I may have seen a message about this earlier, but I can't > seem to find it. I've come across a small issue when decrypting PGP > encrypted data. When decrypting the data, Cryptix seems to add a > newline character to the end of the original data. It seems to me that > the original data should not have changed in any way. Can someone > confirm this behavior in Cryptix to make sure that it's not just > something in my own code? > > I'm just testing using a simple string such as "Testing 1, 2, 3...", > encrypting the string and then immediately decrypting it and comparing > the result with the original. I am using the 20050418 OpenPGP snapshot, > the 20050328 JCE snapshot, and a key pair that was generated using > Cryptix. If you're passing in a string, the canonicalization does this (amongst some other things like dash-escaping, changing all line endings to CRLF etc). Some recent posts on the openpgp standards list suggest that this particular behaviour for the last line can be tweaked. As a workaround: use the methods in the LiteralMessageBuilder that take a byte[] instead of a String. These -- Edwin |