Base24 v0.1.3 Base24 View Source

Base24 encoder and decoder.

Link to this section Summary

Functions

Decode a String to a binary

Encode bytes to a String (binary)

Link to this section Functions

Link to this function

decode24(data)

View Source
decode24(binary()) :: binary() | :error

Decode a String to a binary

The byte_size() of the string must be a multiple of 7.

Examples

iex> Base24.decode24("5YEATXA")
<<0x88, 0x55, 0x33, 0x11>>
Link to this function

encode24(data)

View Source
encode24(binary()) :: binary() | :error

Encode bytes to a String (binary)

The byte_size() of the string must be a multiple of 4.

Examples

iex> Base24.encode24(<<0x88, 0x55, 0x33, 0x11>>)
"5YEATXA"