   """
   @spec decode32!(binary) :: binary
   @spec decode32!(binary, Keyword.t) :: binary
-  def decode32!(string, opts \\ []) do
+  def decode32!(string, opts \\ [])
+
+  def decode32!(string, opts) when is_binary(string) and rem(byte_size(string), 8) == 0 do
     case = Keyword.get(opts, :case, :upper)
-    do_decode32(string, decode_case(case, &dec32/1))
+    do_decode32(case, string)
+  end
+
+  def decode32!(string, _opts) when is_binary(string) do
+    raise ArgumentError, "incorrect padding"
   end
 
   @doc """

  @spec encode32(binary, Keyword.t) :: binary
  def encode32(data, opts \\ []) when is_binary(data) do
    case = Keyword.get(opts, :case, :upper)
    do_encode32(data, encode_case(case, &enc32/1))
  end

  @doc """

  @spec encode16(binary, Keyword.t) :: binary
  def encode16(data, opts \\ []) when is_binary(data) do
    case = Keyword.get(opts, :case, :upper)
    do_encode16(case, data)
  end

  @doc """
  Decodes a base 16 encoded string into a binary string.
