Bring the whole workspace into compliance with the repo's rustfmt config (edition 2024, max_width 100, use_small_heuristics = "Max"), which had drifted across many crates. Pure formatting — no logic changes; `cargo fmt --check` is now clean and `cargo build --workspace` is green.
10 lines
432 B
Rust
10 lines
432 B
Rust
use lawsynth_bundle::{BundleSignature, verify_signature};
|
|
|
|
fn main() {
|
|
let world_bytes = b"deterministic bundle payload";
|
|
let tag = BundleSignature::authenticate(b"demo-shared-secret", world_bytes);
|
|
assert!(verify_signature(b"demo-shared-secret", world_bytes, &tag));
|
|
assert!(!verify_signature(b"demo-shared-secret", b"changed payload", &tag));
|
|
println!("authenticated bundle with HMAC-SHA256 tag {}", tag.0);
|
|
}
|