Recover

Trait Recover 

Source
pub trait Recover: Sealed {
    type Public;

    // Required methods
    fn recover_prehashed(&self, message: &[u8; 32]) -> Option<Self::Public>;
    fn recover<M: AsRef<[u8]>>(&self, message: M) -> Option<Self::Public>;
}
Expand description

A signature that allows recovering the public key from a message.

Required Associated Types§

Source

type Public

The public key that will be recovered from the signature.

Required Methods§

Source

fn recover_prehashed(&self, message: &[u8; 32]) -> Option<Self::Public>

Recover the public key from this signature and a pre-hashed message.

Source

fn recover<M: AsRef<[u8]>>(&self, message: M) -> Option<Self::Public>

Recover the public key from this signature and a message.

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.

Implementors§

Source§

impl Recover for KeccakSignature

Source§

type Public = CryptoBytes<PUBLIC_KEY_SERIALIZED_SIZE, (PublicTag, EcdsaKeccakTag)>

Source§

impl Recover for Signature

Source§

type Public = CryptoBytes<PUBLIC_KEY_SERIALIZED_SIZE, (PublicTag, EcdsaTag)>