Struct RedactedPlacement
- Namespace
- MailFathom.Application.SensitiveContent.Redaction
- Assembly
- MailFathom.Application.dll
Where one placeholder stands in a redacted text, and how much of the analyzed text it replaced.
public readonly record struct RedactedPlacement : IEquatable<RedactedPlacement>
- Implements
- Inherited Members
Remarks
One per merged region rather than one per finding, because two detectors recognizing the same credential produce one placeholder — so this is the sequence a reader of the redacted text actually meets, in the order they meet it.
It carries lengths rather than positions in the redacted text, since every such position follows from the ones before it. What it exists for is MapOffset(int): an offset recorded against the text as it was — a page boundary inside an attachment, above all — has to be findable in the text that was actually stored, and a placeholder is shorter or longer than what it replaced.
It says nothing about what was removed, exactly as Findings does not: a length is not the text, and recreating the leak the redaction prevented is what this whole feature exists to stop.
Constructors
- RedactedPlacement(int, int, int)
Where one placeholder stands in a redacted text, and how much of the analyzed text it replaced.
Properties
- Length
How many characters of that text the placeholder replaced.
- PlaceholderLength
How many characters the placeholder itself occupies.
- Start
Where the replaced region begins in the text that was analyzed.