Trait RawSignatureValidator

Source
pub trait RawSignatureValidator {
    // Required method
    fn validate(
        &self,
        sig: &[u8],
        data: &[u8],
        public_key: &[u8],
    ) -> Result<(), RawSignatureValidationError>;
}
Expand description

A RawSignatureValidator implementation checks a signature encoded using a specific signature algorithm and a private/public key pair.

IMPORTANT: This signature is typically embedded in a wrapper provided by another signature mechanism. In the C2PA ecosystem, this wrapper is typically COSE, but RawSignatureValidator does not implement COSE.

Required Methods§

Source

fn validate( &self, sig: &[u8], data: &[u8], public_key: &[u8], ) -> Result<(), RawSignatureValidationError>

Return Ok(()) if the signature sig is valid for the raw content data and the public key public_key.

Implementors§