https://github.com/niamtokik/berl32
Quick and Dirty Crockford Base32 Erlang Implementation
https://github.com/niamtokik/berl32
base32 crockford encoding erlang
Last synced: 12 months ago
JSON representation
Quick and Dirty Crockford Base32 Erlang Implementation
- Host: GitHub
- URL: https://github.com/niamtokik/berl32
- Owner: niamtokik
- License: isc
- Created: 2016-12-07T20:48:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-07T20:54:01.000Z (over 9 years ago)
- Last Synced: 2025-02-21T09:18:10.321Z (over 1 year ago)
- Topics: base32, crockford, encoding, erlang
- Language: Erlang
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# berl32
Quick and Dirty Crockford Base32 Erlang Implementation
## Build
$ rebar3 compile
## Encoding
> berl32:encode("*").
{ok,<<"1A">>}
> berl32:encode(<<"*">>).
{ok,<<"1A">>}
> berl32:encode("test").
{ok,<<"1T6AWVM">>}
> berl32:encode(<<"test">>).
{ok,<<"1T6AWVM">>}
> berl32:encode(<<18446744073709551615:64/integer>>).
{ok, <<"FZZZZZZZZZZZZ">>}
## Decoding
> berl32:decode(<<"1A">>).
{ok,<<"*">>}
> berl32:decode("1A").
{ok, <<"*">>}
> berl32:decode(<<"FZZZZZZZZZZZZZZ">>).
{ok,<<"ÿÿÿÿÿÿÿÿÿ">>}
## Todo
* add checksum/control character support
* add more unit test
* add more documentation
* add profiling and benchmarking