All Projects → OrKoN → base-x-rs

OrKoN / base-x-rs

Licence: MIT License
Encode/decode any base

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to base-x-rs

scure-base
Secure, audited & 0-deps implementation of bech32, base64, base32, base16 & base58
Stars: ✭ 27 (+92.86%)
Mutual labels:  base-x

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].