Table of Contents

Method FindIntegrityDefect

Namespace
MailFathom.Application.EmailContent.Storage
Assembly
MailFathom.Application.dll

FindIntegrityDefect()

Finds the defect that makes the stored payload differ from what was recorded for it.

public EmailContentDefect? FindIntegrityDefect()

Returns

EmailContentDefect?

The defect, or null when the payload is exactly what was written.

Remarks

The length is checked before the digest because it is the cheaper answer to the same question and because it names the more likely fault precisely: a truncated payload is what a partial write leaves behind, and reporting it as a hash mismatch would describe a repaired copy as a corrupted one.

A payload carrying WasVerifiedIntact answers without hashing again. The digest is computed over the whole message, so a mailbox read that hashed once in the store and once in the reader would pay for the same answer twice; the flag is set only where the check has actually run, and the record is immutable, so no later hand can invalidate it.