restoreState method
Restores the hash computation state from a previously saved state.
Implementation
@override
Keccak restoreState(KeccakState savedState) {
_ensureAlive("Keccak.restoreState", _cleaned, null);
if (savedState.type != KeccakFamily.keccak) {
throw CoreErrors.cryptoFailed(
"Keccak.restoreState",
reason: "Mismatch state type.",
);
}
_blockSize = savedState.blockSize;
BinaryOps.zero(_state);
_state.setAll(0, savedState.data);
_pos = savedState.pos;
_finished = false;
return this;
}