47 releases (5 breaking)
Uses old Rust 2015
0.6.1 | Jul 7, 2017 |
---|---|
0.5.7 | Jul 5, 2017 |
#1 in #wdg
97 downloads per month
140KB
2K
SLoC
rust-base32
Install
Cargo.toml
[dependencies]
wdg-base32="*"
How to use?
B32::<type>::encode(data);
B32::<type>::validation(data);
B32::<type>::decode(data);
B32::<type>::unsafe_decode(data);
type | u8/i8 | u16/i16 | u32/i32 | u64/i64 | String |
---|---|---|---|---|---|
encode | -/- | -/- | -/- | -/- | + |
validation | +/+ | +/+ | +/+ | +/+ | + |
decode | +/+ | +/+ | +/+ | +/+ | + |
Examples
extern crate wdg_base32;
use wdg_base32::{B32,B32Encode,B32Decode};
fn main(){
// u8
println!("{}",B32::<String>::encode(5u8));
// u16
println!("{}",B32::<String>::encode(5u16));
}