redactScreenText function

String redactScreenText(
  1. String text,
  2. RedactionPipeline? redactor
)

Redacts screen-derived text. Defaults to a fresh pipeline so the entropy/context layers still mask token-shaped secrets even when the host passes nothing — redaction has no exceptions (#622 threat model).

Implementation

String redactScreenText(String text, RedactionPipeline? redactor) =>
    (redactor ?? RedactionPipeline(registeredSecrets: const [])).redact(text);