Skip to main content

Crate matrix256

Crate matrix256 

Source
Expand description

matrix256 — reproducible fingerprints for optical discs and filesystem trees.

The active algorithm version lives in v1: a SHA-256 over a canonical serialization of the (path, size) records of every regular file under the walk root. See SPEC.md in the spec repo for the normative specification: https://github.com/shitwolfymakes/matrix256/blob/main/SPEC.md.

Calling code addresses the algorithm explicitly:

use matrix256::v1;
let digest = v1::fingerprint("/media/user/DISC")?;

The crate exposes nothing at the top level so future versions can be added as sibling submodules (v2, …) without a “current” default that would silently change behavior.

Modules§

v1
matrix256v1 — reference Rust implementation of the filesystem-walk fingerprint. Every regular file under the walk root contributes one (relative-path, size) record to a SHA-256 hash. The walk and serialization logic here must stay in lockstep with the normative spec in SPEC.md (https://github.com/shitwolfymakes/matrix256/blob/main/SPEC.md). If one changes, the other must too.