Table of Contents

Class PageFilterFingerprint

Namespace
MailFathom.Application.Paging
Assembly
MailFathom.Application.dll

Reduces the filters a page was read under to the short stable text its cursor carries.

public static class PageFilterFingerprint
Inheritance
PageFilterFingerprint
Inherited Members

Remarks

A keyset position names a page edge only within the filtered set it was computed for, so a cursor carries a digest of that set and a query refuses one whose digest is not its own. Which fields go into the digest is each reading's own question and stays in its own ComputeFingerprint; how they are reduced to text is this.

The digest is truncated because it distinguishes one caller's own filter sets rather than resisting a search for a collision: a forged fingerprint buys a boundary inside a page that same caller is already entitled to read. That is what makes this the weaker of the two schemes in the repository, and deliberately so. EmailTimelineFilter hashes a length-prefixed canonical text instead, so no value it covers can be written to look like the field boundary — a stronger scheme for a surface where a filter is caller-composed and long-lived. The two are not interchangeable: a cursor encodes the digest it was issued with, so moving either reading onto the other's scheme invalidates every cursor a client is part-way through.

The separator is chosen because a filter value is not expected to contain it. That is an assumption rather than an invariant — a free-text filter is refused only for being blank — and where it fails, two different filter sets reduce to one digest and a cursor issued for the first is accepted for the second. The consequence stays inside the bound above: both sets belong to the same caller, over the same account, and name a boundary that caller may already read.

Methods

Of(params string?[])

Reduces one reading's filter values to the fingerprint its cursors carry.