saveState method

  1. @override
HashState saveState()
override

Saves the current hash computation state into a serializable state object.

This method saves the current state of the hash computation, including the data buffer, hash state, and etc, into a serializable state object. The saved state can be later restored using the restoreState method.

Returns a HashState object containing the saved state information.

Implementation

@override
HashState saveState() {
  if (_inner is! SerializableHash) {
    throw MessageException(
        "hmac: can't saveState() because hash doesn't implement it");
  }
  return (_inner as SerializableHash).saveState();
}