pub trait Verifier {
type Signature: Signature;
// Required method
fn verify(
&self,
namespace: Option<&[u8]>,
msg: &[u8],
sig: &Self::Signature,
) -> bool;
}
Expand description
Verifies Signatures over messages.
Required Associated Types§
Required Methods§
Sourcefn verify(
&self,
namespace: Option<&[u8]>,
msg: &[u8],
sig: &Self::Signature,
) -> bool
fn verify( &self, namespace: Option<&[u8]>, msg: &[u8], sig: &Self::Signature, ) -> bool
Verify that a Signature is a valid over a given message.
The message should not be hashed prior to calling this function. If a particular scheme requires a payload to be hashed before it is signed, it will be done internally.
Because namespace is prepended to message before signing, the namespace provided here must match the namespace provided during signing.