Struct keynesis::Seed [−][src]
Implementations
impl Seed
[src]
pub const SIZE: usize
[src]
pub fn generate<RNG>(rng: &mut RNG) -> Self where
RNG: RngCore + CryptoRng,
[src]
RNG: RngCore + CryptoRng,
Generate a random see with the given Cryptographically secure Random Number Generator (RNG).
This is useful to generate one time only Seed
that does not
need to be remembered or saved.
pub fn derive_from_key<K, P>(key: K, password: P) -> Self where
K: AsRef<[u8]>,
P: AsRef<[u8]>,
[src]
K: AsRef<[u8]>,
P: AsRef<[u8]>,
it is possible to derive the Seed from a given key
the key may be given by a secure hardware or simply be a mnemonic phrase given by a user and a password.
It is possible, but not recommended, that the password is left empty. However, the key needs to be large enough to generate enough entropy for the derived seed.
pub fn into_rand_chacha(self) -> ChaChaRng
[src]
use this to seed a ChaCha RNG
then you can use the RNG to create new private key. This is an handy way to derive a private key from a key and a password (or an HSM and a password?)
Trait Implementations
impl AsRef<[u8]> for Seed
[src]
impl Clone for Seed
[src]
impl Debug for Seed
[src]
impl Display for Seed
[src]
impl Drop for Seed
[src]
impl From<[u8; 32]> for Seed
[src]
impl FromStr for Seed
[src]
Auto Trait Implementations
impl RefUnwindSafe for Seed
impl Send for Seed
impl Sync for Seed
impl Unpin for Seed
impl UnwindSafe for Seed
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
pub fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
[src]
U: FromIterator<char>,
pub fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
[src]
U: FromIterator<char>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,