pub fn verify(bytes: &[u8]) -> Result<bool, FileError>Expand description
Recompute the content hash from a file image and check it against the header
— detects corruption or truncation of the payload sections. The
LABEL_INDEX, SCHEMA and predicate-restricted TEXT_INDEX sections (kinds 8,
9, 11) are outside that hash — an older reader’s verify must keep passing
on a file that carries them — so each is checked against its own leading
digest instead. The QUAD_INDEX section (kind 10) is hashed by reference: its
digest is the seal inside the (hashed) index container, checked here.