helium/erl-base58

Name: erl-base58

Owner: Helium

Description: A simple Erlang Base58 encoder and decoder

Forked from: titan098/erl-base58

Created: 2018-02-01 21:34:33.0

Updated: 2018-02-01 21:34:35.0

Pushed: 2018-02-01 22:06:45.0

Homepage:

Size: 802

Language: Erlang

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Erl-Base58

Version: 0.1.0

This is a simple implementation of a Base58 encoder and decoder for Integers and Binaries. Base58 is most prevalent in the Bitcoin virtual currency system. The Base58 representation makes use of a representation that is mostly free from ambiguous characters, this makes is easier for a human to verify that the Base58 string is correct.

Usage

The following example demonstrates the usage of this module:

ase58:integer_to_base58(16#00010966776006953D5567439E5E39F86A0D273BEED61967F6).
wLL9Risc3QfPqBUvKofHmBQ7wMtjvM"
ase58:base58_to_integer("16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM").
0294593250030202636073700053352635053786165627414518
ase58:base58_to_integer("16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM") == 16#00010966776006953D5567439E5E39F86A0D273BEED61967F6.

ase58:binary_to_base58(binary:encode_unsigned(16#00010966776006953D5567439E5E39F86A0D273BEED61967F6)).
wLL9Risc3QfPqBUvKofHmBQ7wMtjvM"
ase58:base58_to_binary("6UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM").
 1,9,102,119,96,6,149,61,85,103,67,158,94,57,248,106,13,
,59,238,214,25,103,246>>
ase58:check_base58("16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM"). 

ase58:check_base58("16UwLL9Risc3QfPqBUvKofHmBQ7wMtjv0").
e
Functions

The following functions have been exposed:

License

This application is licensed under an Apache 2.0 License

Copyright 2013 David Ellefsen 

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.