Bouncy Castle Encryption for Large XML Files?
843811Aug 19 2009 — edited Aug 19 2009Hi,
I am trying to encrypt files > 8 KB using the KeyBasedLargeFileProcessor Utility class of Bouncy Castle.
It's encrypting the file. But, unable to decrypt the same encrypted file. Hence it's encrypting incorrectly.
While trying to decrypt the encrypted file, it says "It was encrypted with a key (4E616D65) that does not exist"
Please suggest what change needs to be made in the 'encryptFile' method where it says -
"OutputStream cOut = cPk.open(out, new byte[1 << 16]);"
I tried changing the value, but it doesn't work. The maximum file size that we may encrypt is around 3 MB.
The files that are being encrypted / decrypted are XML files.
Any inputs are highly appreciated.
Thanks,
Tan