On this page
Decide what the manifest means
The source dates in this guide identify documentation checks on 22 October 2026, not original publication dates. Follow each citation for the standard or documentation edition being discussed.
Before hashing anything, write the boundary of the package. A manifest can describe a folder, an archive, or each distribution inside an export. Do not mix these meanings in one file. These are proposed editorial fields, not a claim that Rightmark currently creates or verifies them.
For a checksum comparison to establish integrity against an expected package, trust or independently authenticate the manifest first. Record who supplied it and how the expected digest was obtained. If both arrive through the same untrusted channel, both the files and their manifest can be changed together. A match then establishes consistency with that manifest, not authentic origin or protection against deliberate replacement.
| Manifest field | Practical meaning | Review question |
|---|---|---|
relative_path | Stable path inside the package | Is the path safe to display and unambiguous inside this package? |
size_bytes | Number of bytes in the delivered file | Does the recorded size match the bytes that were checked? |
sha256 | Digest of the delivered bytes | Does recomputing the digest produce the recorded value? |
media_type | Declared format, such as text/csv or application/json | Does the parser and file content agree with the declaration? |
role | Why the file is present, such as data, schema, documentation, or evidence | Can a reviewer tell whether a missing file changes the review scope? |
version_id | The release identifier chosen by the owner | Does this package belong to the intended release? |
generated_at | Time the manifest was written, with an offset or UTC form | Can the manifest be compared with the export record? |
Avoid absolute workstation paths, credentials, access tokens, private URLs, personal names, and raw records. A relative path is enough for a package-local check. If a filename itself contains personal or confidential information, use a controlled internal identifier and keep the mapping outside the public worksheet.
Hash the bytes before you transform them
Hash the file as delivered, opened in binary mode. Do not decode a CSV, normalize line endings, remove a byte-order mark, unzip and rezip, or rewrite JSON before calculating the package digest. Each of those actions can change bytes even when a human sees equivalent content. Python’s byte-oriented hashlib interface is the basis for this local example Python Software Foundation, (opens in a new tab).
Local byte-level example
from hashlib import sha256
from pathlib import Path
def sha256_file(path: Path) -> str:
digest = sha256()
with path.open("rb") as stream:
for block in iter(lambda: stream.read(1024 * 1024), b""):
digest.update(block)
return digest.hexdigest()The block size is an implementation choice. The important properties are that the stream is binary and that every byte is fed to the same digest in order. Record the algorithm name beside the value. A bare hexadecimal string is harder to interpret later.
If you create a normalized derivative for analysis, give it its own manifest row and digest. Do not replace the original row with the derivative’s hash. The original export and the derivative answer different questions.
Verify paths, sizes, and digests
Verification should fail closed. A checker should report a missing file, an unexpected file, a size mismatch, and a digest mismatch separately. A matching digest does not excuse a missing schema, a wrong media type, or a file placed under the wrong logical role.
| Result | What it tells you | Next action |
|---|---|---|
| Missing | The package does not contain a manifest row’s file | Stop and reconcile the package boundary. |
| Unexpected | A delivered file is not described | Add it to the scope decision or quarantine it. |
| Size mismatch | Bytes differ in length | Preserve both records and investigate packaging or transfer. |
| Digest mismatch | The checked bytes differ from the recorded bytes | Do not silently regenerate the manifest. Identify which copy is authoritative. |
| Digest matches, parser fails | Bytes are unchanged but the declared format or content is unusable | Record the technical failure separately; integrity is not readability. |
| All checks match | The described package is byte-consistent | Continue to rights, privacy, schema, and sample review. |
When an archive itself is the deliverable, decide whether the manifest hashes the archive, its unpacked members, or both. Hashing only an archive proves the archive bytes are stable. It does not make an individual member easy to locate or compare. Hashing only members does not prove the archive wrapper was transferred unchanged. The choice belongs in the package record.
Keep the integrity record separate from the rights record
A checksum can answer, “Are these the same bytes?” It cannot answer, “May this collection be licensed?” Keep title, authority, contributor terms, consent or notice evidence, privacy flags, exclusions, and intended use in their own review records. A file can pass a digest check while containing the wrong scope, personal data, confidential material, or a source whose terms do not permit the intended use.
Do not publish a real manifest that exposes private filenames or internal storage layout. Use a redacted or synthetic example when demonstrating the shape. Keep the actual package and any mapping from internal IDs in controlled storage.
Pair this byte-level check with the data provenance log and data card template when you need source, rights, exclusions, and scope evidence together. The broader export guidance covers export quality by tool; this guide owns the manifest boundary and digest question.
After the owner has a package boundary, a manifest, and evidence references, the Rightmark appraisal path may be the next preparation reference for an eligible owner. The appraisal path does not turn a checksum into approval, a quote, or a completed licensing review. Resolve rights, privacy, and contractual questions with the appropriate owner or counsel before sharing an archive.