4 releases

0.0.3 Jun 25, 2024
0.0.2 Jan 6, 2021
0.0.1 Sep 6, 2020
0.0.0 May 23, 2020

#1664 in Encoding

Download history 94/week @ 2024-07-22 99/week @ 2024-07-29 97/week @ 2024-08-05 119/week @ 2024-08-12 89/week @ 2024-08-19 126/week @ 2024-08-26 82/week @ 2024-09-02 89/week @ 2024-09-09 73/week @ 2024-09-16 111/week @ 2024-09-23 60/week @ 2024-09-30 26/week @ 2024-10-07 77/week @ 2024-10-14 45/week @ 2024-10-21 53/week @ 2024-10-28 48/week @ 2024-11-04

226 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

~10KB