Trait tink_core::Verifier

source ·
pub trait Verifier: VerifierBoxClone {
    // Required method
    fn verify(&self, signature: &[u8], data: &[u8]) -> Result<(), TinkError>;
}
Expand description

Verifier is the verifying interface for digital signature.

Implementations of this trait are secure against adaptive chosen-message attacks. Signing data ensures authenticity and integrity of that data, but not its secrecy.

Required Methods§

source

fn verify(&self, signature: &[u8], data: &[u8]) -> Result<(), TinkError>

Returns Ok(()) if signature is a valid signature for data; otherwise returns an error.

Trait Implementations§

source§

impl From<Primitive> for Box<dyn Verifier>

source§

fn from(p: Primitive) -> Box<dyn Verifier>

Converts to this type from the input type.

Implementors§