ExBase58 (ex_base58 v0.1.0)

Base58 encoding and decoding.

It uses https://github.com/debris/base58 rust library

Link to this section Summary

Functions

Decodes from Base58 format

Encodes into Base58 format

Link to this section Functions

Link to this function

decode(encoded)

Specs

decode(String.t()) :: {:ok, binary()} | {:error, :decode_error}

Decodes from Base58 format

examples

Examples

iex> ExBase58.decode("c4oi")
{:ok, "hey"}

iex> ExBase58.decode("Cn8eVZg")
{:ok, "hello"}

iex> ExBase58.decode("Hello")
{:error, :decode_error}

Specs

encode(binary()) :: String.t()

Encodes into Base58 format

examples

Examples

iex> ExBase58.encode("hey")
"c4oi"

iex> ExBase58.encode("hello")
"Cn8eVZg"