update method

  1. @override
void update(
  1. Uint8List inp,
  2. int inpOff,
  3. int len
)
override

Add len bytes of data contained in inp, starting at position inpOff ti the digested input.

Implementation

@override
void update(Uint8List inp, int inpOff, int len) {
  // fill the current word
  while ((_mOff != 0) && (len > 0)) {
    updateByte(inp[inpOff]);
    inpOff++;
    len--;
  }

  // process whole words.
  while (len > 16) {
    _m.setRange(0, 16, inp.sublist(inpOff));
    _processCheckSum(_m);
    _processBlock(_m);
    len -= 16;
    inpOff += 16;
  }

  // load in the remainder.
  while (len > 0) {
    updateByte(inp[inpOff]);
    inpOff++;
    len--;
  }
}