Polyjuice Util v0.2.1 Polyjuice.Util.Randomizer View Source

Random string generator module.

Link to this section Summary

Functions

Generate random string based on the given length. It is also possible to generate certain type of randomise string using the options below

Link to this section Functions

Link to this function

crypto_random_string(length \\ 30)

View Source
crypto_random_string(non_neg_integer()) :: binary()
Link to this function

randomize(length, type \\ :all)

View Source

Generate random string based on the given length. It is also possible to generate certain type of randomise string using the options below:

  • :all - generate alphanumeric random string
  • :alpha - generate nom-numeric random string
  • :numeric - generate numeric random string
  • :upcase - generate upper case non-numeric random string
  • :downcase - generate lower case non-numeric random string
  • :upcase_numeric - generate uppercase alphanumeric random string
  • :downcase_numeric - generate downcase alphanumeric random string

Example

iex> Randomizer.randomizer(20) //"Je5QaLj982f0Meb0ZBSK"