Open zhulinpinyu opened 4 years ago
定义字符串长度假设: 64
64
def random_str(length \\ 64) do :crypto.strong_rand_bytes(length) |> Base.encode64() |> binary_part(0, length) end
定义字符串长度假设:
64