10 Replies Latest reply: Dec 15, 2017 6:06 AM by Mark Sohm RSS

javax.crypto.CipherInputStream returns -1 prematurely

gillaspy Newbie

I've been chasing some strange behavior in my app and have narrowed it down to the CipherInputStream class only on the Blackberry KeyOne device.


In my app, we write a file using the CipherOutputStream class.  That seems to work ok ( at least the file size is correct).

But when we attempt to read that file using the CipherInputStream class, the stream only returns the last portion of the file.


I've created a test app that demonstrates the problem.




this test passes on every other device, but fails on the Blackberry keyOne.


Please let me know if  there is a better/more appropriate place to post this kind of thing.