|
|
@ -156,6 +156,12 @@ public class DecryptingPartInputStream extends FileInputStream {
|
|
|
|
|
|
|
|
|
|
|
|
//data retrieved using cipher.update doesn't always match cipher.getOutputSize (but should never be larger)
|
|
|
|
//data retrieved using cipher.update doesn't always match cipher.getOutputSize (but should never be larger)
|
|
|
|
int outputLen = cipher.getOutputSize(read);
|
|
|
|
int outputLen = cipher.getOutputSize(read);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (outputLen < length) {
|
|
|
|
|
|
|
|
readLength += cipher.update(internalBuffer, 0, read, buffer, offset);
|
|
|
|
|
|
|
|
return readLength;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
byte[] transientBuffer = new byte[outputLen];
|
|
|
|
byte[] transientBuffer = new byte[outputLen];
|
|
|
|
outputLen = cipher.update(internalBuffer, 0, read, transientBuffer, 0);
|
|
|
|
outputLen = cipher.update(internalBuffer, 0, read, transientBuffer, 0);
|
|
|
|
if (outputLen <= length) {
|
|
|
|
if (outputLen <= length) {
|
|
|
|