File: README.md

package info (click to toggle)
rust-base-x 0.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 128 kB
  • sloc: makefile: 2
file content (42 lines) | stat: -rw-r--r-- 871 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# base-x

[![Build Status](https://travis-ci.org/OrKoN/base-x-rs.svg?branch=master)](https://travis-ci.org/OrKoN/base-x-rs)

This is a Rust fork of https://github.com/cryptocoinjs/base-x
And this my very first Rust project: please review the source code!

## Installation

Add this to `Cargo.toml` file:

```toml
[dependencies]
base-x = "0.2.0"
```

## Usage

```rust
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

- [Friedel Ziegelmayer](https://github.com/dignifiedquire)
- [Maciej Hirsz](https://github.com/maciejhirsz)