Skip to main content

ArtifactVerifier

Trait ArtifactVerifier 

Source
pub trait ArtifactVerifier {
    // Required method
    fn verify(&self, data: &[u8], signature: &[u8]) -> bool;

    // Provided methods
    fn expected_jws_algorithm(&self) -> Option<&'static str> { ... }
    fn expected_cose_algorithm(&self) -> Option<SigningAlgorithm> { ... }
}
Expand description

Verifies a raw signature over raw bytes with one key.

Required Methods§

Source

fn verify(&self, data: &[u8], signature: &[u8]) -> bool

true when signature is a valid signature over data.

Provided Methods§

Source

fn expected_jws_algorithm(&self) -> Option<&'static str>

The JOSE alg this verifier expects for JWS artifacts, when known.

Source

fn expected_cose_algorithm(&self) -> Option<SigningAlgorithm>

The COSE algorithm this verifier expects for COSE artifacts, when known.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§