Expand description
§Entrouter Universal
Pipeline integrity guardian. What goes in, comes out identical.
This crate provides Base64 encoding, SHA-256 fingerprinting, and integrity verification primitives that can be composed into higher-level constructs:
Envelope– wrap data in one of four modes (standard, URL-safe, compressed, TTL)Guardian– track data through a multi-layer pipeline and detect where mutations occurChain– build a cryptographic audit trail where each link references the previousUniversalStruct– wrap individual struct fields so you know which field was tampered with
§Quick start
use entrouter_universal::{encode_str, decode_str, fingerprint_str, verify};
let encoded = encode_str("hello world");
let fp = fingerprint_str("hello world");
let result = verify(&encoded, &fp).unwrap();
assert!(result.intact);Re-exports§
pub use chain::Chain;pub use chain::ChainDiff;pub use envelope::Envelope;pub use guardian::Guardian;pub use signed_envelope::SignedEnvelope;pub use universal_struct::UniversalStruct;pub use verify::VerifyResult;
Modules§
Enums§
- Universal
Error - Errors returned by Entrouter Universal operations.
Functions§
- decode
- Decode a Base64 string back to raw bytes.
- decode_
str - Decode a Base64 string back to a UTF-8
String. - encode
- Base64-encode raw bytes.
- encode_
str - Base64-encode a UTF-8 string.
- fingerprint
- Compute a SHA-256 fingerprint of raw bytes, returned as a hex string.
- fingerprint_
str - Compute a SHA-256 fingerprint of a UTF-8 string.
- verify
- Decode
encodedand verify its fingerprint matchesoriginal_fingerprint.