finish method

Future<void> finish(
  1. int totalLength
)

Seals the final chunk. totalLength is the full plaintext length.

Implementation

Future<void> finish(int totalLength) async {
  if (_endOffset == null) await _sealFinal(totalLength);
  // A resumed file may hold stale bytes past the new end from an earlier, longer attempt.
  await _sink.truncate(_endOffset!);
}