clean method

  1. @override
void clean()
override

Cleans sensitive data and resets the internal state of the hash function.

This method securely zeros and resets the internal state, including the state vectors, buffer, key (if present), counters, and flags. It ensures that any sensitive information used during the hash computation is securely erased.

Implementation

@override
void clean() {
  zero(_vtmp);
  zero(_mtmp);
  zero(_state);
  zero(_buffer);
  zero(_initialState);
  if (_paddedKey != null) {
    zero(_paddedKey!);
  }
  _bufferLength = 0;
  zero(_ctr);
  zero(_flag);
  _lastNode = false;
  _finished = false;
}