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
impl CryptoType for Dummy
§type Pair = CryptoBytes<0, DummyTag>
type Pair = CryptoBytes<0, DummyTag>
The pair key type of this crypto.
source§impl Pair for Dummy
impl Pair for Dummy
§type Public = CryptoBytes<0, DummyTag>
type Public = CryptoBytes<0, DummyTag>
The type which is used to encode a public key.
§type Seed = CryptoBytes<0, DummyTag>
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>
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)
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>
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>
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>
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 verify<M: AsRef<[u8]>>(_: &Self::Signature, _: M, _: &Self::Public) -> bool
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 from_seed(seed: &Self::Seed) -> Self
fn from_seed(seed: &Self::Seed) -> Self
Generate new key pair from the provided
seed
. Read moresource§fn from_string_with_seed(
s: &str,
password_override: Option<&str>,
) -> Result<(Self, Option<Self::Seed>), SecretStringError>
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 moresource§fn from_string(
s: &str,
password_override: Option<&str>,
) -> Result<Self, SecretStringError>
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