doFinal method

  1. @override
int doFinal(
  1. Uint8List? out,
  2. int? outOff
)
override

Store the digest of previously given data in buffer out starting at offset outOff. This method returns the size of the digest.

Implementation

@override
int doFinal(Uint8List? out, int? outOff) {
  // add padding
  var paddingByte = _m.length - _mOff;
  for (var i = _mOff; i < _m.length; i++) {
    _m[i] = paddingByte;
  }

  //do final check sum
  _processCheckSum(_m);

  // do final block process
  _processBlock(_m);

  _processBlock(_c);

  out!.setRange(outOff!, outOff + 16, _x.sublist(_xOff));

  reset();

  return _DIGEST_LENGTH;
}