Expand description
SignedShot Validator Library
Validates SignedShot media authenticity proofs.
§Quick Start
Use the high-level validate function for complete validation:
use signedshot_validator::{validate, ValidationResult};
use std::path::Path;
let result = validate(
Path::new("photo.sidecar.json"),
Path::new("photo.jpg"),
).unwrap();
if result.valid {
println!("Valid! Publisher: {}", result.capture_trust.publisher_id);
} else {
println!("Invalid: {}", result.error.unwrap_or_default());
}§Python Bindings
This library can be built as a Python module using PyO3.
Build with: maturin build --features python
import signedshot
result = signedshot.validate_files("photo.sidecar.json", "photo.jpg")
if result.valid:
print(f"Publisher: {result.capture_trust['publisher_id']}")Re-exports§
pub use error::Result;pub use error::ValidationError;pub use integrity::compute_file_hash;pub use integrity::compute_hash;pub use integrity::verify_capture_id_match;pub use integrity::verify_content_hash;pub use integrity::verify_device_public_key_fingerprint;pub use integrity::verify_media_integrity;pub use integrity::verify_signature as verify_media_signature;pub use jwt::fetch_jwks;pub use jwt::parse_jwt;pub use jwt::verify_signature;pub use jwt::CaptureTrustClaims;pub use jwt::Jwk;pub use jwt::Jwks;pub use jwt::JwtHeader;pub use jwt::ParsedJwt;pub use sidecar::CaptureTrust;pub use sidecar::MediaIntegrity;pub use sidecar::Sidecar;pub use validate::validate;pub use validate::validate_from_bytes;pub use validate::CaptureTrustResult;pub use validate::MediaIntegrityResult;pub use validate::ValidationResult;