Base.hex_decode32-exclamation-mark
You're seeing just the function
hex_decode32-exclamation-mark
, go back to Base module for more information.
Specs
Decodes a base 32 encoded string with extended hexadecimal alphabet into a binary string.
An ArgumentError
exception is raised if the padding is incorrect or
a non-alphabet character is present in the 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======")
"foobar"
iex> Base.hex_decode32!("cpnmuoj1e8======", case: :lower)
"foobar"
iex> Base.hex_decode32!("cpnMuOJ1E8======", case: :mixed)
"foobar"
iex> Base.hex_decode32!("CPNMUOJ1E8", padding: false)
"foobar"