Base.hex_decode32
You're seeing just the function
hex_decode32
, go back to Base module for more information.
Specs
Decodes a base 32 encoded string with extended hexadecimal alphabet into a binary string.
Options
The accepted options are:
:case
- specifies the character case to accept when decoding:padding
- specifies whether to require padding
The values for :case
can be:
:upper
- only allows upper case characters (default):lower
- only allows lower case characters:mixed
- allows mixed case characters
The values for :padding
can be:
true
- requires the input string to be padded to the nearest multiple of 8 (default)false
- ignores padding from the input string
Examples
iex> Base.hex_decode32("CPNMUOJ1E8======")
{:ok, "foobar"}
iex> Base.hex_decode32("cpnmuoj1e8======", case: :lower)
{:ok, "foobar"}
iex> Base.hex_decode32("cpnMuOJ1E8======", case: :mixed)
{:ok, "foobar"}
iex> Base.hex_decode32("CPNMUOJ1E8", padding: false)
{:ok, "foobar"}