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

pub fn encode(data: &[u8], wordlist: &Wordlist<'_>) -> Result<String, Error>
This is supported on crate feature bip39 only.

Encode the given bytestring as a mnemonic sentence using the specified wordlist. Only bytestrings of length 128, 160, 192, 224 and 256 bits are accepted, and this is the only expected error case.

Currently the Japanese language is not supported, or at least the implementation is not generating the expected sentences compared to our test vectors. Use at your own risk!