Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shiguredo/base32_clockwork

Base32 (RFC 4648, Crockford, Clockwork)
https://github.com/shiguredo/base32_clockwork

base32 erlang

Last synced: 2 months ago
JSON representation

Base32 (RFC 4648, Crockford, Clockwork)

Awesome Lists containing this project

README

        

# base32

Erlang 向けの Base32 ライブラリです。次の種類のバージョンに対応しています。

- [RFC 4648 \- The Base16, Base32, and Base64 Data Encodings](https://tools.ietf.org/html/rfc4648)
- [Crockford's Base 32](https://www.crockford.com/base32.html)
- [Clockwork Base32](https://gist.github.com/szktty/228f85794e4187882a77734c89c384a8): Crockford's Base32 をシンプルにしたバージョンです。

## ビルド

```bash
rebar3 compile
```

## 利用

例:

```bash
$ rebar3 shell
1> base32:decode(clockwork, <<"AXQQEB10D5T20WK5C5P6RY90EXQQ4TVK44">>).
<<"Wow, it really works!">>
2> base32:encode(clockwork, <<"Wow, it really works!">>).
<<"AXQQEB10D5T20WK5C5P6RY90EXQQ4TVK44">>
```

## rebar3 deps

```erlang
{deps, [{base32, "2023.1.0", {pkg, base32_clockwork}}]}.
```

## エンコード方式の種類

- `rfc4648`: RFC 4648
- `crockford`: Crockford's Base32
- `crockford_check`: Crockford's Base32 (チェックサムつき)
- `clockwork`: Clockwork Base32

## ライセンス

```text
Copyright 2021-2024, Shiguredo Inc.
Copyright 2021, SUZUKI Tetsuya (Original Author)

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