Base.hex_encode32

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

hex_encode32(data, opts \\ [])

View Source

Specs

hex_encode32(binary(), keyword()) :: binary()

Encodes a binary string into a base 32 encoded string with an extended hexadecimal alphabet.

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.hex_encode32("foobar")
"CPNMUOJ1E8======"

iex> Base.hex_encode32("foobar", case: :lower)
"cpnmuoj1e8======"

iex> Base.hex_encode32("foobar", padding: false)
"CPNMUOJ1E8"