pub trait RecoverableSignature: Sized {
type PubKey;
type Signer: RecoverableSigner<Sig = Self, PubKey = Self::PubKey>;
type DefaultHash: HashFunction<32>;
// Required method
fn recover_with_hash<H: HashFunction<32>>(
&self,
msg: &[u8],
) -> Result<Self::PubKey, FastCryptoError>;
// Provided method
fn recover(&self, msg: &[u8]) -> Result<Self::PubKey, FastCryptoError> { ... }
}Expand description
Trait impl’d by recoverable signatures
Required Associated Types§
type PubKey
type Signer: RecoverableSigner<Sig = Self, PubKey = Self::PubKey>
type DefaultHash: HashFunction<32>
Required Methods§
Sourcefn recover_with_hash<H: HashFunction<32>>(
&self,
msg: &[u8],
) -> Result<Self::PubKey, FastCryptoError>
fn recover_with_hash<H: HashFunction<32>>( &self, msg: &[u8], ) -> Result<Self::PubKey, FastCryptoError>
Recover the public key from this signature. Assuming that the given hash function was used for signing.
Note: This is currently only used for Secp256r1 and Secp256k1 where the hash function must have 32 byte output.
Provided Methods§
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.