Tiny hex encoder used wherever a byte slice needs to be rendered
as a hex string. Centralised so the same bytes.iter().map(|b| format!("{:02x}", b)).collect() doesn’t get re-typed across the
crate.
Time helpers used across the engine. Centralised so the same
SystemTime::now().duration_since(UNIX_EPOCH).unwrap_or_default()
incantation doesn’t get re-typed at 20+ call sites.
Read name from the env. If unset/empty, fall back to
<name>_FILE. Returns None when neither produces a usable
value. Trims trailing whitespace from file contents.
Current wall-clock unix milliseconds. 0 if the system clock is
before the epoch (impossible on real hardware, but the API
returns a Result so we degrade gracefully instead of panicking).