Revert "Revert "Cut down on object allocation in CipherInputStream""
As Cipher#getOutputSize can return different value in some cases for the same cipher object and input buffer. To accomodate the behavior, the size of the output buffer should be checked every time when the CipherInputStream#getMoreData is called and whenever the new size is greater than the current size, array must be reinitialized. This reverts commit 298b528c. Bug: 32643789 Test: CipherInputStreamTest in vogar Change-Id: I6c9685a2a058eac6cfc4be9e0e81d397929baf58
Loading
Please sign in to comment