Fix handling of extra input
@@ -38,7 +38,7 @@ public int doFinal(byte[] input, int inputOffset, int inputLength, byte[] extraI
{
int ciphertextLength = inputLength + extraInputLength;
- int outputLength = cipher.processBytes(input, inputOffset, ciphertextLength, output, outputOffset);
+ int outputLength = cipher.processBytes(input, inputOffset, inputLength, output, outputOffset);
if (extraInputLength > 0)
{
outputLength += cipher.processBytes(extraInput, 0, extraInputLength, output,
