lawsynth/services/artifact/tests/signature_test.rs
2026-08-16 23:40:41 +03:00

10 lines
387 B
Rust

use lawsynth_artifact_service::BundleAuthenticator;
#[test]
fn bundle_authenticator_detects_modified_bundle_bytes() {
let authenticator = BundleAuthenticator::new(b"local secret".to_vec());
let signature = authenticator.authenticate(b"bundle");
assert!(authenticator.verify(b"bundle", &signature).valid);
assert!(!authenticator.verify(b"modified", &signature).valid);
}