Function crypto::keys::bip39::wordlist::decode[][src]

pub fn decode(ms: &str, wordlist: &Wordlist<'_>) -> Result<Vec<u8>, Error>
This is supported on crate feature bip39 only.

Decode and compare the checksum given a mnemonic sentence and the wordlist used in the generation process.

Be aware that the error detection has a noticable rate of false positives. Given CS checksum bits (CS := ENT / 32) the expected rate of false positives are one in 2^CS. For example given 128 bit entropy that’s 1 in 16.