secretgenerator
Rust bindings for the auditable
secretgenerator CLI.
This crate is a thin transport layer: each function shells out to the
binary, parses the schema-v1 JSON envelope, and returns a typed
Output. Cryptographic primitives stay in the audited binary with
SLSA Level 3 provenance and cosign keyless signatures; this crate just
parses JSON.
Install
The crate and the binary install separately:
Then install the CLI once with whichever method fits your environment:
# or
# or
Quick start
use ;
let out = password?;
println!;
# Ok::
Run the full example with cargo run --example quickstart.
Error handling
use ;
match password
The CLI's stable error codes are E_ENTROPY_TOO_LOW,
E_CHARSET_EMPTY, E_CLASS_IMPOSSIBLE, E_INVALID_ARGS, and
E_RNG_FAILURE.
Why not pure Rust?
Cryptographic primitives belong in audited binaries with reproducible builds and SLSA provenance, not duplicated across language wrappers. Verify any release end-to-end with the procedure in docs/AUDIT.md.