utility

Digest-bound checkpoint

Compare known input bytes against a trusted digest record. A real checkpoint must also bind configuration, version and verified output; a digest alone does not establish stage completion or authenticity.

Formal Syntax & Structure

bash syntaxbash
sha256sum INPUT > CHECKPOINT; sha256sum --status -c CHECKPOINT

Return Value

exit status

Compare known input bytes against a trusted digest record. A real checkpoint must also bind configuration, version and verified output; a digest alone does not establish stage completion or authenticity.

Working Example

Example Snippetbash
printf 'input\n' > input.txtsha256sum input.txt > checkpoint.txtif sha256sum --status -c checkpoint.txt; then printf 'input unchanged\n'; else exit 1; fiprintf 'changed\n' > input.txtif sha256sum --status -c checkpoint.txt; then exit 1; else printf 'rebuild required\n'; fi
Bash Reference