cleanSavedState method

  1. @override
void cleanSavedState(
  1. SH1State savedState
)
override

Clean up and reset the saved state of the hash object to its initial state. This function erases the buffer and sets the state and length to the default values. It is used to ensure that a previously saved hash state is cleared and ready for reuse.

savedState: The hash state to be cleaned and reset.

Implementation

@override
void cleanSavedState(SH1State savedState) {
  savedState.buffer = List.empty();
  savedState.state = List<int>.from([
    0x67452301,
    0xEFCDAB89,
    0x98BADCFE,
    0x10325476,
    0xC3D2E1F0,
  ], growable: false);
  savedState.length = 0;
}