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 ((_wordBufferOffset != 0) && (len! > 0)) {
    updateByte(inp![inpOff]);

    inpOff++;
    len--;
  }

  // process whole words.
  while (len! > 8) {
    _processWord(inp, inpOff);

    inpOff += 8;
    len -= 8;
    _byteCount.sum(8);
  }

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

    inpOff++;
    len--;
  }
}