mnumonic

Crates.iomnumonic
lib.rsmnumonic
version0.2.0
sourcesrc
created_at2020-02-10 02:17:33.104966
updated_at2020-03-01 11:52:12.807103
descriptionA tiny library to convert opaque binary data to and from a human-memorable phrase
homepagehttps://github.com/staktrace/mnumonic/blob/master/README.md
repositoryhttps://github.com/staktrace/mnumonic
max_upload_size
id206887
size10,133
Kartikaya Gupta (kats) (staktrace)

documentation

README

mnumonic

Build Status Crate

This is a tiny Rust library that allows you to convert binary byte data to and from a phrase that is memorable for a human. It is useful for cases where you need a human to transfer certain information (e.g. an opaque identifier) between systems where copy/paste may not be readily available. Instead of asking them to type in an opaque number like 3735928559, you can instead have them type in "sweet pump second tree".

Currently only English is supported, but the code is written to allow other languages too. PRs to add word files for other languages are welcome.

See API documentation at docs.rs for full details.

Example usage

use mnumonic;
let opaque_identifier : u32 = 0xDEADBEEF;
let human_readable = mnumonic::encode_u32_joined(opaque_identifier);
println!("Instead of remembering '{}' (difficult), you can remember '{}' (easier)", opaque_identifier, human_readable);
let back_to_identifier = mnumonic::decode_u32_joined(&human_readable).unwrap();
assert_eq!(opaque_identifier, back_to_identifier);
Commit count: 15

cargo fmt