pub trait Recoverable: Signature {
type PublicKey: PublicKey<Signature = Self>;
// Required method
fn recover_signer(
&self,
namespace: &[u8],
msg: &[u8],
) -> Option<Self::PublicKey>;
}Expand description
An extension of Signature that supports public key recovery.
Required Associated Types§
Required Methods§
Sourcefn recover_signer(
&self,
namespace: &[u8],
msg: &[u8],
) -> Option<Self::PublicKey>
fn recover_signer( &self, namespace: &[u8], msg: &[u8], ) -> Option<Self::PublicKey>
Recover the PublicKey of the signer that created this Signature over the 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.
Like when verifying a signature, the namespace must match what was used during signing exactly.
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.