pub struct Mnemonic { /* private fields */ }Expand description
BIP 39 のニーモニック。もとになるエントロピー(16〜32バイト)を持ち、使い終わるとメモリを0で上書きする。
中身が表示されないように、Display は持たない。
Implementations§
Source§impl Mnemonic
impl Mnemonic
Sourcepub fn generate_with_rng<R: CryptoRng + ?Sized>(
rng: &mut R,
word_count: WordCount,
) -> Self
pub fn generate_with_rng<R: CryptoRng + ?Sized>( rng: &mut R, word_count: WordCount, ) -> Self
渡された暗号用の乱数で作る。
Sourcepub fn from_entropy(entropy: &[u8]) -> Result<Self, InvalidEntropyLength>
pub fn from_entropy(entropy: &[u8]) -> Result<Self, InvalidEntropyLength>
エントロピーから作る。長さは16、20、24、28、32バイトのどれか。
Sourcepub fn word_count(&self) -> usize
pub fn word_count(&self) -> usize
単語の数。12、15、18、21、24のどれか。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mnemonic
impl RefUnwindSafe for Mnemonic
impl Send for Mnemonic
impl Sync for Mnemonic
impl Unpin for Mnemonic
impl UnsafeUnpin for Mnemonic
impl UnwindSafe for Mnemonic
Blanket Implementations§
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