Callback function when an error occurs in the keystream.
late final FutureOr<void> Function(Object exception) onError;