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) {
  finish();

  var view = ByteData.view(out.buffer, out.offsetInBytes, out.length);
  h1.pack(view, outOff, Endian.big);
  h2.pack(view, outOff + 8, Endian.big);
  h3.pack(view, outOff + 16, Endian.big);
  h4.pack(view, outOff + 24, Endian.big);
  h5.pack(view, outOff + 32, Endian.big);
  h6.pack(view, outOff + 40, Endian.big);
  h7.pack(view, outOff + 48, Endian.big);
  h8.pack(view, outOff + 56, Endian.big);

  reset();

  return _DIGEST_LENGTH;
}