Minimal command-line hashing utility for EriX SHA-2 workflows.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Erik Inkinen da29c52bf3
All checks were successful
CI / markdown (push) Successful in 20s
CI / test (push) Successful in 2m11s
feat: Use checked CI source acquisition
Integrate the human-reviewed change from sha2-tool#7.
2026-11-12 18:56:51 +02:00
.github ci: Declare policy helper and output boundaries 2026-11-07 18:22:04 +02:00
src refactor: make digest records lossless 2026-07-26 10:31:50 +03:00
tests test: enforce missing docs in integration crates 2026-07-31 21:06:59 +03:00
.editorconfig Initial commit 2026-02-26 15:55:53 +01:00
.gitignore refactor: make digest records lossless 2026-07-26 10:31:50 +03:00
.markdownlint-cli2.yaml Tighten CI markdown policy 2026-05-22 15:10:41 +03:00
ARCHITECTURE.md build: Pin dependency and CI helper source commits 2026-09-12 07:31:13 +03:00
Cargo.lock fix: Align the tracked digest lock query with main 2026-10-30 11:46:30 +02:00
Cargo.toml ci: Use checked sources and main dependencies for baseline checks 2026-10-30 11:12:33 +02:00
CODE_OF_CONDUCT.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:22 +03:00
CONTRIBUTING.md build: Pin dependency and CI helper source commits 2026-09-12 07:31:13 +03:00
LICENSE Initial commit 2026-02-26 15:55:53 +01:00
README.md build: Pin dependency and CI helper source commits 2026-09-12 07:31:13 +03:00
ROADMAP.md build: Pin dependency and CI helper source commits 2026-09-12 07:31:13 +03:00
rustfmt.toml sha2-tool: drop unstable rustfmt options for stable toolchains 2026-03-23 10:19:57 +02:00
SECURITY.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:22 +03:00

sha2-tool

sha2-tool is EriX's clean-room host utility for streaming SHA-256 and SHA-512 digests. It uses lib-sha2, reads only caller-selected inputs, and emits deterministic records suitable for people or automation.

EriX is a clean-room, capability-based microkernel operating system written entirely in Rust. System specifications and the technical manual live in the docs repository.

Purpose of This Repository

This repository owns:

  • the sha256 and sha512 command grammar;
  • streaming reads from explicit host paths or standard input;
  • lossless output-path serialization;
  • usage and operational exit-status contracts; and
  • unit and process-level regression tests.

It does not implement SHA-2, authenticate content, search for inputs, write files, or provide an EriX runtime service.

Command Contract

sha2-tool sha256 [--zero] [--] <PATH|->...
sha2-tool sha512 [--zero] [--] <PATH|->...
sha2-tool --help
sha2-tool --version

- selects standard input and may occur once. -- makes every following argument a path. Inputs are processed in invocation order; readable inputs still produce records when another named input fails, and the final status is nonzero.

The default record is:

<lowercase-hex><space><space><escaped-path><newline>

It is printable ASCII. A backslash is written as \\; every non-printable or non-ASCII platform path byte is written as \xHH. --zero instead writes the platform path bytes unchanged and terminates the record with NUL.

Status 0 means every requested operation completed, status 1 is an input or output failure, and status 2 is invalid command syntax.

Clean-Room Policy

EriX source must be authored within the project. Third-party crates, vendored implementations, copied source, and generators that embed third-party code are not permitted. lib-sha2 is the only dependency and uses a full 40-character commit rev pin.

License

All EriX repositories use the ISC License; see LICENSE.

Development Model

cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
RUSTFLAGS="-D warnings" cargo test --all-targets --all-features
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
markdownlint-cli2

The committed lockfile contains only internal Git sources. CI preserves the exact commit-pinned Git objects without rewriting Cargo.toml or substituting branch heads or synthetic commits.

See ARCHITECTURE.md for invariants and ROADMAP.md for maintained work.

Governance Principles

The tool's host authority is limited to command arguments and inherited standard streams selected by its invoker. It performs no environment lookup, network access, key discovery, input search, or file creation. A digest proves only that bytes hash to a value; it grants no authority and establishes no authenticity.

Contact

Development occurs in the EriX organization. Design decisions require documented rationale. Security reports and maintainer contact are described in SECURITY.md.