verify

Function verify 

Source
pub fn verify<V: Verify>(
    verifier: &V,
    message: &[u8],
    signature: &[u8],
) -> Result<()>
Expand description

Generic verify function that works with any verifier.

This is a convenience function that calls the verify method on any type implementing the Verify trait.

§Arguments

  • verifier - A verifier implementing the Verify trait
  • message - The original message
  • signature - The signature to verify

§Returns

  • Ok(()) - Signature is valid
  • Err(BottleError::VerifyFailed) - If signature verification fails