Base.encode32

You're seeing just the function encode32, go back to Base module for more information.
Link to this function

encode32(data, opts \\ [])

View Source

Specs

encode32(binary(), keyword()) :: binary()

Encodes a binary string into a base 32 encoded string.

Options

The accepted options are:

  • :case - specifies the character case to use when encoding
  • :padding - specifies whether to apply padding

The values for :case can be:

  • :upper - uses upper case characters (default)
  • :lower - uses lower case characters

The values for :padding can be:

  • true - pad the output string to the nearest multiple of 8 (default)
  • false - omit padding from the output string

Examples

iex> Base.encode32("foobar")
"MZXW6YTBOI======"

iex> Base.encode32("foobar", case: :lower)
"mzxw6ytboi======"

iex> Base.encode32("foobar", padding: false)
"MZXW6YTBOI"