Created
August 24, 2016 20:45
-
-
Save indatawetrust/45c72784bb2e0bb3c2771e3d818fb553 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def random_string(length) do | |
:crypto.strong_rand_bytes(length) |> Base.url_encode64 |> binary_part(0, length) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment