Skip to main content

Verifier

Trait Verifier 

Source
pub trait Verifier {
    type Signature: Signature;

    // Required method
    fn verify(
        &self,
        message: &[u8],
        signature: &Self::Signature,
    ) -> AptosResult<()>;
}
Expand description

A trait for types that can verify signatures.

Required Associated Types§

Source

type Signature: Signature

The signature type this verifier can check.

Required Methods§

Source

fn verify(&self, message: &[u8], signature: &Self::Signature) -> AptosResult<()>

Verifies that the signature is valid for the given message.

§Errors

Returns an error if the signature is invalid for the message.

Implementors§

Source§

impl Verifier for Bls12381PublicKey

Available on crate feature bls only.
Source§

impl Verifier for Ed25519PublicKey

Available on crate feature ed25519 only.
Source§

impl Verifier for MultiEd25519PublicKey

Available on crate feature ed25519 only.
Source§

impl Verifier for Secp256k1PublicKey

Available on crate feature secp256k1 only.
Source§

impl Verifier for Secp256r1PublicKey

Available on crate feature secp256r1 only.