mnemonic-16bit

Crates.iomnemonic-16bit
lib.rsmnemonic-16bit
version0.1.1
sourcesrc
created_at2023-02-07 11:46:16.169753
updated_at2023-02-10 06:46:09.838687
descriptionlibrary for converting binary data into phrases with 16 bits per word
homepage
repositoryhttps://github.com/DavidVorick/mneonic-16bit
max_upload_size
id778686
size10,264
David Vorick (DavidVorick)

documentation

README

mnemonic-16bit

mnemonic-16bit is a mnemonic library that will take any binary data and convert it into a phrase which is more human friendly. Each word of the phrase maps to 16 bits, where the first 10 bits are represented by one word from the seed15 dictionary, and the remaining 6 bits are represented by a number between 0 and 63. If the number is '64', that signifies that the word only represents 1 byte instead of 2. Only the final word of a phrase may use the numerical suffix 64.

use mnemonic_16bit::{binary_to_phrase, phrase_to_binary};

fn main() {
    let my_data = [0u8; 2];
    let phrase = binary_to_phrase(&my_data); // "abbey0"
    let data = phrase_to_binary(&phrase).unwrap();
    assert!(data[..] == my_data[..]);
}
Commit count: 0

cargo fmt