Table of Contents

Struct EmailChunkContentHash

Namespace
MailFathom.Application.Emails.Chunking
Assembly
MailFathom.Application.dll

Identifies one chunk by the text it holds together with the rules that cut it out.

public readonly record struct EmailChunkContentHash : IEquatable<EmailChunkContentHash>
Implements
Inherited Members

Remarks

The hash is what makes re-chunking cheap and what makes a vector attributable. An unchanged message cut to unchanged rules yields the same hashes, so nothing downstream is re-done; a change to the rules yields different ones even where the text is identical, so no vector is left hanging on boundaries it no longer describes. A hash covering only the text would report the second case as unchanged, which is the failure ADR 0006 records this type to prevent.

The digest is a value derived from mail content and is treated as such: it is not personal data a reader can invert, but it identifies one, so it is no more loggable than the passage it stands for.

Fields

Length

The number of characters a hexadecimal SHA-256 digest occupies.

Properties

Value

Gets the digest as sixty-four lowercase hexadecimal characters.

Methods

Compute(EmailChunkingRules, bool, string)

Computes the identity of one chunk from its text and the rules that produced it.

Create(string)

Reads back a digest that was written earlier.

ToString()

Returns the fully qualified type name of this instance.