pub trait GenerateSignature {
// Required method
fn generate_signature(
&self,
algorithm: Algorithm,
msg: &[u8],
) -> Result<Vec<u8>, ImplementationError>;
}Expand description
Trait that provides interface to generate signatures given a message and an algorithm.
This is implemented for Vec<u8> and friends as a batteries-included way to generate
signatures from raw key material, but can be implemented for any type of client-controlled
signer as well (yubikey, cloud kms, web3 wallet, etc).
Required Methods§
Sourcefn generate_signature(
&self,
algorithm: Algorithm,
msg: &[u8],
) -> Result<Vec<u8>, ImplementationError>
fn generate_signature( &self, algorithm: Algorithm, msg: &[u8], ) -> Result<Vec<u8>, ImplementationError>
Generate signature given the algorithm and the message to sign.