Merge "Keystore 2.0 SPI: Fix bug in chunked streamer." am: 3af57cab3a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552674 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I71bf84617a2b50b7bba8dfb531636168c0fa6955
This commit is contained in:
@@ -139,7 +139,9 @@ class KeyStoreCryptoOperationChunkedStreamer implements KeyStoreCryptoOperationS
|
|||||||
int inputConsumed = ArrayUtils.copy(input, inputOffset, mChunk, mChunkLength,
|
int inputConsumed = ArrayUtils.copy(input, inputOffset, mChunk, mChunkLength,
|
||||||
inputLength);
|
inputLength);
|
||||||
inputLength -= inputConsumed;
|
inputLength -= inputConsumed;
|
||||||
inputOffset += inputOffset;
|
inputOffset += inputConsumed;
|
||||||
|
mChunkLength += inputConsumed;
|
||||||
|
if (mChunkLength < mChunkSizeMax) return output;
|
||||||
byte[] o = mKeyStoreStream.update(mChunk);
|
byte[] o = mKeyStoreStream.update(mChunk);
|
||||||
if (o != null) {
|
if (o != null) {
|
||||||
output = ArrayUtils.concat(output, o);
|
output = ArrayUtils.concat(output, o);
|
||||||
|
|||||||
Reference in New Issue
Block a user