Skip to main content

Crate entrouter_universal

Crate entrouter_universal 

Source
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 occur
  • Chain – build a cryptographic audit trail where each link references the previous
  • UniversalStruct – 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§

chain
compress
envelope
guardian
signed_envelope
universal_struct
verify

Enums§

UniversalError
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 encoded and verify its fingerprint matches original_fingerprint.