8 lines
180 B
Elixir
8 lines
180 B
Elixir
|
defmodule ChoreTracker.Helpers do
|
||
|
def random_string(length) do
|
||
|
:crypto.strong_rand_bytes(length)
|
||
|
|> Base.encode64(padding: false)
|
||
|
|> binary_part(0, length)
|
||
|
end
|
||
|
end
|