pub struct Dummy;
Expand description
Dummy cryptography. Doesn’t do anything.
Trait Implementations
sourceimpl CryptoType for Dummy
impl CryptoType for Dummy
sourceimpl 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. Read more
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. Read more
type DeriveError = ()
type DeriveError = ()
Error returned from the derive
function.
sourcefn 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
sourcefn 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.
sourcefn 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.
sourcefn 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 more
sourcefn 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.
sourcefn 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.
sourcefn to_raw_vec(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn to_raw_vec(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Return a vec filled with raw data.
sourcefn 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 more
sourcefn 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
sourceimpl Public for Dummy
impl Public for Dummy
sourcefn to_raw_vec(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn to_raw_vec(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Return a Vec<u8>
filled with raw data.
sourcefn as_slice(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
fn as_slice(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Return a slice filled with raw data.
sourcefn to_public_crypto_pair(&self) -> CryptoTypePublicPair
fn to_public_crypto_pair(&self) -> CryptoTypePublicPair
Return CryptoTypePublicPair
from public key.
impl Eq for Dummy
impl StructuralEq for Dummy
impl StructuralPartialEq for Dummy
Auto Trait Implementations
impl RefUnwindSafe for Dummy
impl Send for Dummy
impl Sync for Dummy
impl Unpin for Dummy
impl UnwindSafe for Dummy
Blanket Implementations
sourceimpl<T, U> AsByteSlice<T> for U where
T: ToByteSlice,
U: AsRef<[T]> + ?Sized,
impl<T, U> AsByteSlice<T> for U where
T: ToByteSlice,
U: AsRef<[T]> + ?Sized,
sourceimpl<T, U> AsMutByteSlice<T> for U where
T: ToMutByteSlice,
U: AsMut<[T]> + ?Sized,
impl<T, U> AsMutByteSlice<T> for U where
T: ToMutByteSlice,
U: AsMut<[T]> + ?Sized,
sourceimpl<U> AsMutSliceOf for U where
U: AsMut<[u8]> + ?Sized,
impl<U> AsMutSliceOf for U where
U: AsMut<[u8]> + ?Sized,
pub fn as_mut_slice_of<T>(&mut self) -> Result<&mut [T], Error> where
T: FromByteSlice,
sourceimpl<U> AsSliceOf for U where
U: AsRef<[u8]> + ?Sized,
impl<U> AsSliceOf for U where
U: AsRef<[u8]> + ?Sized,
pub fn as_slice_of<T>(&self) -> Result<&[T], Error> where
T: FromByteSlice,
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash,
impl<T> CallHasher for T where
T: Hash,
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<T> Ss58Codec for T where
T: AsMut<[u8]> + AsRef<[u8]> + Default + Derive,
impl<T> Ss58Codec for T where
T: AsMut<[u8]> + AsRef<[u8]> + Default + Derive,
sourcefn from_string(s: &str) -> Result<Self, PublicError>
fn from_string(s: &str) -> Result<Self, PublicError>
Some if the string is a properly encoded SS58Check address, optionally with a derivation path following. Read more
sourcefn from_string_with_version(
s: &str
) -> Result<(Self, Ss58AddressFormat), PublicError>
fn from_string_with_version(
s: &str
) -> Result<(Self, Ss58AddressFormat), PublicError>
Some if the string is a properly encoded SS58Check address, optionally with a derivation path following. Read more
sourcefn 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. Read more
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn to_ss58check(&self) -> String
fn to_ss58check(&self) -> String
Return the ss58-check string for this key.
sourceimpl<T> ToHex for T where
T: AsRef<[u8]>,
impl<T> ToHex for T where
T: AsRef<[u8]>,
sourcepub fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
pub fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self
into the result. Lower case
letters are used (e.g. f9b4ca
) Read more
sourcepub fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
pub fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self
into the result. Upper case
letters are used (e.g. F9B4CA
) Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcefn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to unchecked_from
.