This seems like a simple question, and I might be missing something obvious, but I can't figure out how to make a function in Elixir that returns a random byte. I want something like:
def random_byte do
<<0>>..<<255>> |> Enum.random()
end
But you can't make a range with binaries. I could just manually type out a list of all 256, but I was hoping there was a better way to do it.