SimpleToken generates random alphanumeric, non-cryptographic string tokens.
- Add
simple_token
to your list of dependencies inmix.exs
:
def deps do
[{:simple_token, "~> 0.1.0"}]
end
- Fetch dependencies
mix deps.get
SimpleToken is really simple to use:
token = SimpleToken.generate # => token: "BKjW17nVOuwekNgP"
token = SimpleToken.generate(24) # => token: "fCleyrpZAO9LXKtsR1xUMFPj"
See LICENSE.