update method
Add len
bytes of data contained in inp
, starting at position inpOff
to the MAC'ed input.
Implementation
@override
void update(final Uint8List inp, final int inOff, final int len) {
var copied = 0;
while (len > copied) {
if (currentBlockOffset == BLOCK_SIZE) {
processBlock();
currentBlockOffset = 0;
}
var toCopy = (len - copied) > (BLOCK_SIZE - currentBlockOffset)
? (BLOCK_SIZE - currentBlockOffset)
: (len - copied);
arrayCopy(inp, copied + inOff, currentBlock, currentBlockOffset, toCopy);
copied += toCopy;
currentBlockOffset += toCopy;
}
}