proofmode 0.9.0

Capture, share, and preserve verifiable photos and videos
Documentation
use thiserror::Error;

#[derive(Error, Debug)]
pub enum SignError {
    #[error("Signing failed: {0}")]
    SigningFailed(String),

    #[error("Verification failed: {0}")]
    VerificationFailed(String),

    #[error("Invalid key: {0}")]
    InvalidKey(String),

    #[error("Invalid signature: {0}")]
    InvalidSignature(String),

    #[error("Invalid platform: {0}")]
    InvalidPlatform(String),

    #[error("Certificate error: {0}")]
    CertificateError(String),

    #[error("Configuration error: {0}")]
    ConfigError(String),

    #[error("IO error: {0}")]
    Io(#[from] std::io::Error),

    #[error("App Attest error: {0}")]
    AppAttest(String),

    #[error("Play Integrity error: {0}")]
    PlayIntegrity(String),

    #[error("Key attestation error: {0}")]
    KeyAttestation(String),

    #[error("Token replay detected: {0}")]
    TokenReplay(String),

    #[error("Device not registered: {0}")]
    DeviceNotRegistered(String),

    #[error("Counter replay detected: {0}")]
    CounterReplay(String),

    #[error("{0}")]
    Other(String),
}

pub type Result<T> = std::result::Result<T, SignError>;