Function crypto::keys::bip39::wordlist::encode

source ·
pub fn encode(data: &[u8], wordlist: &Wordlist<'_>) -> Result<String, Error>
Expand description

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!