finish method

  1. @override
SHA3 finish(
  1. List<int> dst
)
override

Finalizes the hash computation and stores the hash state in the provided List<int> out.

This function completes the hash computation, finalizes the state, and stores the resulting hash in the provided out List<int>. If the hash has already been finished, this method will return the existing state without re-computing.

Parameters:

  • out: The List<int> in which the hash digest is stored.

Returns the current instance of the hash algorithm.

Implementation

@override
SHA3 finish(List<int> dst) {
  if (!_finished) {
    _padAndPermute(0x06);
  } else {
    // Only works for up to blockSize digests,
    // which is the case in our implementation.
    _pos = 0;
  }
  _squeeze(dst);
  return this;
}