reset method

  1. @override
void reset()
override

Resets the current state to start from fresh state

Implementation

@override
void reset() {
  super.reset();
  state[0] = _s0;
  state[1] = _s1;
  state[2] = _s2;
  state[3] = _s3;
  state[4] = _s4;
  state[5] = _s5;
  state[6] = _s6;
  state[7] = _s7;
  // If the key is present, the first block is the key padded with zeroes
  if (key != null) {
    int i;
    for (i = 0; i < key!.length; ++i) {
      buffer[i] = key![i];
    }
    for (; i < blockLength; ++i) {
      buffer[i] = 0;
    }
    messageLength = pos = blockLength;
  }
}