private void calculateMac(byte[] input, int inOff, int len)
{
macBlock = new byte[engine.getBlockSize()];
int totalLength = len;
int inOff_ = inOff;
while (totalLength > 0)
{
for (int byteIndex = 0; byteIndex < engine.getBlockSize(); byteIndex++)
{
b[byteIndex] ^= input[byteIndex + inOff_];
}
multiplyOverField(engine.getBlockSize() * BITS_IN_BYTE, b, H, temp);
temp = Arrays.reverse(temp);
System.arraycopy(temp, 0, b, 0, engine.getBlockSize());
totalLength -= engine.getBlockSize();
inOff_ += engine.getBlockSize();
}
Arrays.fill(temp, (byte)0);
intToBytes(lambda_o, temp, 0);
intToBytes(lambda_c, temp, engine.getBlockSize() / 2);
for (int byteIndex = 0; byteIndex < engine.getBlockSize(); byteIndex++)
{
b[byteIndex] ^= temp[byteIndex];
}
engine.processBlock(b, 0, macBlock, 0);
}