update method

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

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 > _wordBuffer.length) {
    _processWord(inp, inpOff);

    inpOff += _wordBuffer.length;
    len -= _wordBuffer.length;
    _byteCount1.sum(_wordBuffer.length);
  }

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

    inpOff++;
    len--;
  }
}