Wrapping Compression and Decryption IO Streams
Hello all,
I am attempting to create a CipherInputStream wrapped inside of a ZipInputStream like this:
CipherInputStream cipherInputStream = new CipherInputStream(fileURL.openStream(),cipher);
ZipInputStream zipInputStream = new ZipInputStream(cipherInputStream);
And then stream the entire file to it's decompressed and decrypted form onto the filesystem.
Theoretically, this seems possible, but it is not working out the way we had hoped and we continually receive a zero-byte file as a result. Is this a matter of block/chunk ordering and a mismatch between the cipher input stream and the zip input stream? Or is it simply not possible, requiring one to finish the decrypting process into a temporary file and then start the decompression?
Any help and/or insight would be most appreciated.
Thanks!
colin schaub

