cleanSavedState method
Cleans and securely zeros a saved state object, resetting it to an empty state.
This method takes a HashState object, usually representing the state of an MD4 hash, and securely zeros the internal state and data within it. After cleaning, the object is reset to an empty state, ensuring that no sensitive data remains in memory.
Params:
savedState
: The HashState object to be cleaned and reset.
Implementation
@override
void cleanSavedState(SH1State savedState) {
savedState.buffer = List.empty();
savedState.state = List<int>.from([
0x67452301,
0xefcdab89,
0x98badcfe,
0x10325476,
], growable: false);
savedState.length = 0;
}