referrerpolicy=no-referrer-when-downgrade

Trait Recover

pub trait Recover: Sealed {
    type Public;

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

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

Required Associated Types§

type Public

The public key that will be recovered from the signature.

Required Methods§

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

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

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

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§

§

impl Recover for CryptoBytes<sp_core::::ecdsa::GenericSignature::{constant#0}, (SignatureTag, CryptoBytes<sp_core::::ecdsa::GenericPublic::{constant#0}, (PublicTag, EcdsaKeccakTag)>)>

§

type Public = CryptoBytes<sp_core::::ecdsa::GenericPublic::{constant#0}, (PublicTag, EcdsaKeccakTag)>

§

impl Recover for CryptoBytes<sp_core::::ecdsa::GenericSignature::{constant#0}, (SignatureTag, CryptoBytes<sp_core::::ecdsa::GenericPublic::{constant#0}, (PublicTag, EcdsaTag)>)>

§

type Public = CryptoBytes<sp_core::::ecdsa::GenericPublic::{constant#0}, (PublicTag, EcdsaTag)>