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 900b17a0a0
All checks were successful
CI / markdown (push) Successful in 11s
CI / test (push) Successful in 38s
chore: Merge native CLI development into main
Merge the selected feature/native-cli history with an explicit two-parent commit so main retains the development lineage and the validated source snapshot. The resulting tree is identical to the selected feature commit; no dependency pins or runtime behavior are changed by this merge.

Previous main: 6aaf566823
Selected feature: b696118edb

Publish this integration point following the requested cross-repository merge. Preserve the feature branch and immutable dependency objects for reproducibility; do not squash, rebase or rewrite existing commits.
2026-09-12 08:28:52 +03:00
.github build: Pin dependency and CI helper source commits 2026-09-12 07:31:13 +03: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 build: Pin dependency and CI helper source commits 2026-09-12 07:31:13 +03:00
Cargo.toml build: Pin dependency and CI helper source commits 2026-09-12 07:31:13 +03: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.