#base32 #string #binary #decoding

koibumi-base32

A Base32 encoder/decoder library

3 releases

0.0.2 Jan 6, 2021
0.0.1 Sep 6, 2020
0.0.0 May 23, 2020

#1628 in Encoding

Download history 2/week @ 2023-06-09 84/week @ 2023-06-16 67/week @ 2023-06-23 82/week @ 2023-06-30 113/week @ 2023-07-07 49/week @ 2023-07-14 69/week @ 2023-07-21 49/week @ 2023-07-28 44/week @ 2023-08-04 42/week @ 2023-08-11 41/week @ 2023-08-18 36/week @ 2023-08-25 43/week @ 2023-09-01 59/week @ 2023-09-08 55/week @ 2023-09-15 17/week @ 2023-09-22

177 downloads per month
Used in 16 crates (4 directly)

GPL-3.0-or-later

8KB
115 lines

This crate is a Base32 encoder/decoder library.

The library is intended to be used to implement an Onion address encoder/decoder. The library uses RFC 4648 Base32 alphabet, but encoded string is lowercase by default. The library does not support padding.


lib.rs:

This crate is a Base32 encoder/decoder library.

The library is intended to be used to implement an Onion address encoder/decoder. The library uses RFC 4648 Base32 alphabet, but encoded string is lowercase by default. The library does not support padding.

Examples

use koibumi_base32 as base32;

let test = base32::encode(b"hello");
let expected = "nbswy3dp";
assert_eq!(test, expected);
use koibumi_base32 as base32;

let test = base32::decode("nbswy3dp")?;
let expected = b"hello";
assert_eq!(test, expected);

Dependencies

~11KB