public void update(byte[] in, int inOff, int len)
{
if (len < 0)
{
throw new IllegalArgumentException(
"can't have a negative input length!");
}
int blockSize = engine.getBlockSize();
int gapLen = blockSize - bufOff;
if (len > gapLen)
{
System.arraycopy(in, inOff, buf, bufOff, gapLen);
processBlock(buf, 0);
bufOff = 0;
len -= gapLen;
inOff += gapLen;
while (len > blockSize)
{
processBlock(in, inOff);
len -= blockSize;
inOff += blockSize;
}
}
System.arraycopy(in, inOff, buf, bufOff, len);
bufOff += len;
}