|
|
@ -125,7 +125,6 @@ public class DecryptingPartInputStream extends FileInputStream {
|
|
|
|
|
|
|
|
|
|
|
|
private int readIncremental(byte[] buffer, int offset, int length) throws IOException {
|
|
|
|
private int readIncremental(byte[] buffer, int offset, int length) throws IOException {
|
|
|
|
int readLength = 0;
|
|
|
|
int readLength = 0;
|
|
|
|
//Use data from overflow buffer first if present
|
|
|
|
|
|
|
|
if (null != overflowBuffer) {
|
|
|
|
if (null != overflowBuffer) {
|
|
|
|
if (overflowBuffer.length > length) {
|
|
|
|
if (overflowBuffer.length > length) {
|
|
|
|
System.arraycopy(overflowBuffer, 0, buffer, offset, length);
|
|
|
|
System.arraycopy(overflowBuffer, 0, buffer, offset, length);
|
|
|
@ -154,7 +153,6 @@ public class DecryptingPartInputStream extends FileInputStream {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
mac.update(internalBuffer, 0, read);
|
|
|
|
mac.update(internalBuffer, 0, read);
|
|
|
|
|
|
|
|
|
|
|
|
//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) {
|
|
|
|
if (outputLen <= length) {
|
|
|
|