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

#18 in Value formatting

Download history 147637/week @ 2024-07-21 148072/week @ 2024-07-28 140406/week @ 2024-08-04 171417/week @ 2024-08-11 155853/week @ 2024-08-18 138630/week @ 2024-08-25 146478/week @ 2024-09-01 139873/week @ 2024-09-08 142155/week @ 2024-09-15 153916/week @ 2024-09-22 156234/week @ 2024-09-29 164397/week @ 2024-10-06 154351/week @ 2024-10-13 171571/week @ 2024-10-20 160273/week @ 2024-10-27 172618/week @ 2024-11-03

666,609 downloads per month
Used in 1,485 crates (21 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