pub trait Signer: SecKeyGen + PubKeyGen {
// Required methods
fn info(&self) -> SignerInfo;
fn sign(
&self,
buf: &mut [u8],
data: &[u8],
sec_key: &[u8],
) -> Result<usize, Box<dyn Error + 'static>>;
fn verify(
&self,
data: &[u8],
sig: &[u8],
pub_key: &[u8],
) -> Result<(), Box<dyn Error + 'static>>;
}Expand description
A stateless (oneshot) signature interface
Required Methods§
Sourcefn info(&self) -> SignerInfo
fn info(&self) -> SignerInfo
Returns information about the signer