pub trait RecoverableSigner {
type PubKey;
type Sig: RecoverableSignature<Signer = Self, PubKey = Self::PubKey>;
// Required method
fn sign_recoverable_with_hash<H: HashFunction<32>>(
&self,
msg: &[u8],
) -> Self::Sig;
// Provided method
fn sign_recoverable(&self, msg: &[u8]) -> Self::Sig { ... }
}Expand description
Trait impl’d by public / private keypairs that can generate recoverable signatures
Required Associated Types§
Required Methods§
Sourcefn sign_recoverable_with_hash<H: HashFunction<32>>(
&self,
msg: &[u8],
) -> Self::Sig
fn sign_recoverable_with_hash<H: HashFunction<32>>( &self, msg: &[u8], ) -> Self::Sig
Sign as a recoverable signature using the given hash function.
Note: This is currently only used for Secp256r1 and Secp256k1 where the hash function must have 32 byte output.
Provided Methods§
Sourcefn sign_recoverable(&self, msg: &[u8]) -> Self::Sig
fn sign_recoverable(&self, msg: &[u8]) -> Self::Sig
Sign as a recoverable signature.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.