Elixir, Bitcoin, Testing, Software Development, Programming.
that its length in bits is a multiple of thirty two: def encode(data) when is_binary(data) and bit_size(data) >= 128 and bit_size(data) <= 256 and rem(bit_size(data), 32) == 0 do {:ok, data |> attach_checksum |> map_onto_wordlist} end If all of these requirements hold, we’ll return the encoded data