View Source base32 (base32 v1.0.0)

Base32 encoding and decoding

Summary

Functions

Equivalent to decode(Bin, []).

Decode a string into base 32.

Equivalent to encode(Bin, []).

Encode a string into base 32.

Functions

decode/1

-spec decode(<<_:_*32>>) -> binary().

Equivalent to decode(Bin, []).

decode/2

-spec decode(<<_:_*32>> | string(), proplists:proplist()) -> binary().

Decode a string into base 32.

Options:

  • hex: whether decode the input as hexadecimal encoding. Defaults to false.

encode/1

-spec encode(binary() | string()) -> <<_:_*32>>.

Equivalent to encode(Bin, []).

encode/2

-spec encode(binary() | string(), proplists:proplist()) -> <<_:_*32>>.

Encode a string into base 32.

Options:

  • hex: whether to use hexadecimal encoding. Defaults to false.
  • lower: whether to use lowercase encoding. Defaults to false.
  • nopad: whether to skip padding. Defaults to false.