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]
Implementations
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 moreimpl Public for Dummy
impl Signature for Dummy
source§impl<const N: usize, T> ByteArray for CryptoBytes<N, T>
impl<const N: usize, T> ByteArray for CryptoBytes<N, T>
source§impl<const N: usize, T> Clone for CryptoBytes<N, T>
impl<const N: usize, T> Clone for CryptoBytes<N, T>
source§impl<const N: usize, T> Decode for CryptoBytes<N, T>
impl<const N: usize, T> Decode for CryptoBytes<N, T>
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Attempt to deserialise the value from input.
source§fn decode_into<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
dst_: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>
fn decode_into<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, dst_: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§impl<const N: usize, T> Default for CryptoBytes<N, T>
impl<const N: usize, T> Default for CryptoBytes<N, T>
source§impl<const N: usize, T> Deref for CryptoBytes<N, T>
impl<const N: usize, T> Deref for CryptoBytes<N, T>
source§impl<const N: usize, T> Encode for CryptoBytes<N, T>
impl<const N: usize, T> Encode for CryptoBytes<N, T>
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl<const N: usize, T> FromEntropy for CryptoBytes<N, T>
impl<const N: usize, T> FromEntropy for CryptoBytes<N, T>
source§impl<const N: usize, T> Hash for CryptoBytes<N, T>
impl<const N: usize, T> Hash for CryptoBytes<N, T>
source§impl<const N: usize, T> MaxEncodedLen for CryptoBytes<N, T>
impl<const N: usize, T> MaxEncodedLen for CryptoBytes<N, T>
source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
source§impl<const N: usize, T> Ord for CryptoBytes<N, T>
impl<const N: usize, T> Ord for CryptoBytes<N, T>
source§impl<const N: usize, T> PartialEq for CryptoBytes<N, T>
impl<const N: usize, T> PartialEq for CryptoBytes<N, T>
source§impl<const N: usize, T> PartialOrd for CryptoBytes<N, T>
impl<const N: usize, T> PartialOrd for CryptoBytes<N, T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<const N: usize, T> PassBy for CryptoBytes<N, T>
impl<const N: usize, T> PassBy for CryptoBytes<N, T>
source§impl<const N: usize, T> PassByInner for CryptoBytes<N, T>
impl<const N: usize, T> PassByInner for CryptoBytes<N, T>
source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Consumes
self
and returns the inner type.source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Construct
Self
from the given inner
.source§impl<const N: usize, T> TypeInfo for CryptoBytes<N, T>
impl<const N: usize, T> TypeInfo for CryptoBytes<N, T>
source§impl<const N: usize, T> UncheckedFrom<[u8; N]> for CryptoBytes<N, T>
impl<const N: usize, T> UncheckedFrom<[u8; N]> for CryptoBytes<N, T>
source§fn unchecked_from(data: [u8; N]) -> Self
fn unchecked_from(data: [u8; N]) -> Self
Convert from an instance of
T
to Self. This is not guaranteed to be
whatever counts as a valid instance of T
and it’s up to the caller to
ensure that it makes sense.