1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use crate::vault::{PublicKey, Signature};
use crate::Result;
use crate::{async_trait, compat::boxed::Box};
/// Defines the Vault interface for `Signature` verification.
#[async_trait]
pub trait Verifier {
/// Verify a signature for the given data using the given public key.
async fn verify(
&self,
signature: &Signature,
public_key: &PublicKey,
data: &[u8],
) -> Result<bool>;
}