pub struct Dummy;
Expand description
Dummy cryptography. Doesn’t do anything.
Trait Implementations§
source§impl ByteArray for Dummy
impl ByteArray for Dummy
source§impl Pair for Dummy
impl Pair for Dummy
§type Seed = Dummy
type Seed = Dummy
The type used to (minimally) encode the data required to securely create
a new key pair.
§type Signature = Dummy
type Signature = Dummy
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.
§type DeriveError = ()
type DeriveError = ()
Error returned from the
derive
function.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 None
if it’s invalid.source§fn derive<Iter: Iterator<Item = DeriveJunction>>(
&self,
_: Iter,
_: Option<Dummy>,
) -> Result<(Self, Option<Dummy>), Self::DeriveError>
fn derive<Iter: Iterator<Item = DeriveJunction>>( &self, _: Iter, _: Option<Dummy>, ) -> Result<(Self, Option<Dummy>), Self::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
it will return
None
. Read moresource§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 verify_weak<P: AsRef<[u8]>, M: AsRef<[u8]>>(_: &[u8], _: M, _: P) -> bool
fn verify_weak<P: AsRef<[u8]>, M: AsRef<[u8]>>(_: &[u8], _: M, _: P) -> bool
Verify a signature on a message. Returns true if the signature is good.
source§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 moresource§impl PartialEq for Dummy
impl PartialEq for Dummy
source§impl Public for Dummy
impl Public for Dummy
source§fn to_public_crypto_pair(&self) -> CryptoTypePublicPair
fn to_public_crypto_pair(&self) -> CryptoTypePublicPair
Return
CryptoTypePublicPair
from public key.impl Eq for Dummy
impl StructuralPartialEq for Dummy
Auto Trait Implementations§
impl Freeze for Dummy
impl RefUnwindSafe for Dummy
impl Send for Dummy
impl Sync for Dummy
impl Unpin for Dummy
impl UnwindSafe for Dummy
Blanket Implementations§
source§impl<T, U> AsByteSlice<T> for U
impl<T, U> AsByteSlice<T> for U
fn as_byte_slice(&self) -> &[u8] ⓘ
source§impl<T, U> AsMutByteSlice<T> for U
impl<T, U> AsMutByteSlice<T> for U
fn as_mut_byte_slice(&mut self) -> &mut [u8] ⓘ
source§impl<U> AsMutSliceOf for U
impl<U> AsMutSliceOf for U
fn as_mut_slice_of<T>(&mut self) -> Result<&mut [T], Error>where
T: FromByteSlice,
source§impl<U> AsSliceOf for U
impl<U> AsSliceOf for U
fn as_slice_of<T>(&self) -> Result<&[T], Error>where
T: FromByteSlice,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
source§impl<T> Ss58Codec for T
impl<T> Ss58Codec for T
source§fn from_string(s: &str) -> Result<T, PublicError>
fn from_string(s: &str) -> Result<T, PublicError>
Some if the string is a properly encoded SS58Check address, optionally with
a derivation path following.
source§fn from_string_with_version(
s: &str,
) -> Result<(T, Ss58AddressFormat), PublicError>
fn from_string_with_version( s: &str, ) -> Result<(T, Ss58AddressFormat), PublicError>
Some if the string is a properly encoded SS58Check address, optionally with
a derivation path following.
source§fn format_is_allowed(f: Ss58AddressFormat) -> bool
fn format_is_allowed(f: Ss58AddressFormat) -> bool
A format filterer, can be used to ensure that
from_ss58check
family only decode for
allowed identifiers. By default just refuses the two reserved identifiers.source§fn from_ss58check(s: &str) -> Result<Self, PublicError>
fn from_ss58check(s: &str) -> Result<Self, PublicError>
Some if the string is a properly encoded SS58Check address.
source§fn from_ss58check_with_version(
s: &str,
) -> Result<(Self, Ss58AddressFormat), PublicError>
fn from_ss58check_with_version( s: &str, ) -> Result<(Self, Ss58AddressFormat), PublicError>
Some if the string is a properly encoded SS58Check address.
source§fn to_ss58check_with_version(&self, version: Ss58AddressFormat) -> String
fn to_ss58check_with_version(&self, version: Ss58AddressFormat) -> String
Return the ss58-check string for this key.
source§fn to_ss58check(&self) -> String
fn to_ss58check(&self) -> String
Return the ss58-check string for this key.
source§impl<T> ToHex for T
impl<T> ToHex for T
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.