cleanSavedState method
Cleans and resets a saved hash state, securely erasing sensitive data.
Parameters:
savedState: The hash state to clean and reset securely.
Implementation
@override
void cleanSavedState(Blake2bState savedState) {
BinaryOps.zero(savedState.state);
BinaryOps.zero(savedState.buffer);
BinaryOps.zero(savedState.initialState);
if (savedState.paddedKey != null) {
BinaryOps.zero(savedState.paddedKey!);
}
savedState.bufferLength = 0;
BinaryOps.zero(savedState.ctr);
BinaryOps.zero(savedState.flag);
savedState.lastNode = false;
}