referrerpolicy=no-referrer-when-downgrade

Type Alias sp_core::crypto::Dummy

source ·
pub type Dummy = CryptoBytes<0, DummyTag>;
Expand description

Dummy cryptography. Doesn’t do anything.

Aliased Type§

struct Dummy(pub [u8; 0], _);

Fields§

§0: [u8; 0]

Trait Implementations§

source§

impl CryptoType for Dummy

§

type Pair = CryptoBytes<0, DummyTag>

The pair key type of this crypto.
source§

impl Derive for Dummy

source§

fn derive<Iter: Iterator<Item = DeriveJunction>>( &self, _path: Iter, ) -> Option<Self>

Derive a child key from a series of given junctions. Read more
source§

impl Pair for Dummy

§

type Public = CryptoBytes<0, DummyTag>

The type which is used to encode a public key.
§

type Seed = CryptoBytes<0, DummyTag>

The type used to (minimally) encode the data required to securely create a new key pair.
§

type Signature = CryptoBytes<0, DummyTag>

The type used to represent a signature. Can be created from a key pair and a message and verified with the message and a public key.
source§

fn generate_with_phrase(_: Option<&str>) -> (Self, String, Self::Seed)

Generate new secure (random) key pair and provide the recovery phrase. Read more
source§

fn from_phrase( _: &str, _: Option<&str>, ) -> Result<(Self, Self::Seed), SecretStringError>

Returns the KeyPair from the English BIP39 seed phrase, or an error if it’s invalid.
source§

fn derive<Iter: Iterator<Item = DeriveJunction>>( &self, _: Iter, _: Option<Dummy>, ) -> Result<(Self, Option<Dummy>), DeriveError>

Derive a child key from a series of given junctions.
source§

fn from_seed_slice(_: &[u8]) -> Result<Self, SecretStringError>

Make a new key pair from secret seed material. The slice must be the correct size or an error will be returned. Read more
source§

fn sign(&self, _: &[u8]) -> Self::Signature

Sign a message.
source§

fn verify<M: AsRef<[u8]>>(_: &Self::Signature, _: M, _: &Self::Public) -> bool

Verify a signature on a message. Returns true if the signature is good.
source§

fn public(&self) -> Self::Public

Get the public key.
source§

fn to_raw_vec(&self) -> Vec<u8>

Return a vec filled with raw data.
source§

fn generate() -> (Self, Self::Seed)

Generate new secure (random) key pair. Read more
source§

fn from_seed(seed: &Self::Seed) -> Self

Generate new key pair from the provided seed. Read more
source§

fn from_string_with_seed( s: &str, password_override: Option<&str>, ) -> Result<(Self, Option<Self::Seed>), SecretStringError>

Interprets the string s in order to generate a key Pair. Returns both the pair and an optional seed, in the case that the pair can be expressed as a direct derivation from a seed (some cases, such as Sr25519 derivations with path components, cannot). Read more
source§

fn from_string( s: &str, password_override: Option<&str>, ) -> Result<Self, SecretStringError>

Interprets the string s in order to generate a key pair. Read more
source§

impl Public for Dummy

source§

impl Signature for Dummy