public final int update (byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException

Continues a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part.

The first inputLen bytes in the input buffer, starting at inputOffset inclusive, are processed, and the result is stored in the output buffer, starting at outputOffset inclusive.

If the output buffer is too small to hold the result, a ShortBufferException is thrown. In this case, repeat this call with a larger output buffer. Use getOutputSize to determine how big the output buffer should be.

If inputLen is zero, this method returns a length of zero.

Note: this method should be copy-safe, which means the input and output buffers can reference the same byte array and no unprocessed input data is overwritten when the result is copied into the output buffer.

Parameters:
input    the input buffer
inputOffset    the offset in input where the input starts
inputLen    the input length
output    the buffer for the result
outputOffset    the offset in output where the result is stored

Returns:  the number of bytes stored in output

Exceptions:
IllegalStateException    if this cipher is in a wrong state (e.g., has not been initialized)
ShortBufferException    if the given output buffer is too small to hold the result