16 releases

Uses old Rust 2015

0.2.11 Jun 24, 2022
0.2.8 Nov 8, 2020
0.2.6 Oct 14, 2019
0.2.5 May 29, 2019
0.1.0 Mar 30, 2016

#13 in Value formatting

Download history 143623/week @ 2023-11-26 132672/week @ 2023-12-03 111899/week @ 2023-12-10 122486/week @ 2023-12-17 58388/week @ 2023-12-24 92890/week @ 2023-12-31 112219/week @ 2024-01-07 134223/week @ 2024-01-14 133045/week @ 2024-01-21 135778/week @ 2024-01-28 152249/week @ 2024-02-04 145407/week @ 2024-02-11 131624/week @ 2024-02-18 134167/week @ 2024-02-25 126487/week @ 2024-03-03 50214/week @ 2024-03-10

451,205 downloads per month
Used in 1,360 crates (18 directly)

MIT license

17KB
390 lines

base-x

Build Status

This is a Rust fork of https://github.com/cryptocoinjs/base-x

WARNING: This module is NOT RFC3548 compliant, it cannot be used for base16 (hex), base32, or base64 encoding in a standards compliant manner.

And this my very first Rust project: please review the source code!

Installation

Add this to Cargo.toml file:

[dependencies]
base-x = "0.2.0"

Usage

extern crate base_x;

fn main() {
    let decoded = base_x::decode("01", "11111111000000001111111100000000").unwrap();
    let encoded = base_x::encode("01", &decoded);
    assert_eq!(encoded, "11111111000000001111111100000000");
}

Changelog

  • 0.2.0

    Breaking change: alphabet has to be provided as an array of bytes instead of a string.

  • 0.1.0

    initial version

Contributors

No runtime deps