Struct iop_keyvault::Seed [−][src]
The seed used for BIP32 derivations. A seed cannot be turned back into a phrase, because there is salted hashing involed in creating it from the BIP39 mnemonic phrase.
Implementations
impl Seed
[src]
pub const BITS: usize
[src]
Number of bits in entropy generated from the bip39 mnemonic
pub const DEMO_PHRASE: &'static str
[src]
A BIP39 phrase we use in most of the demo videos and proof-of-concept applications. Do not use it in production code.
pub const PASSWORD: &'static str
[src]
Legacy password used in the 0.0.1 version of the crate. Since 0.0.2 the crate always requires a password, which should be “” by default when the user does not provide one.
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
[src]
Creates seed from a raw 512-bit binary seed
Example
let bytes = "86f07ba8b38f3de2080912569a07b21ca4ae2275bc305a14ff928c7dc5407f32a1a3a26d4e2c4d9d5e434209c1db3578d94402cf313f3546344d0e4661c9f8d9"; let seed_res = Seed::from_bytes(hex::decode(bytes).unwrap().as_slice()); assert!(seed_res.is_ok());
pub fn as_bytes(&self) -> &[u8]
[src]
Returns the bytes of the seed
Trait Implementations
impl Debug for Seed
[src]
impl<'de> Deserialize<'de> for Seed
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize 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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,