Skip to content

v1.0.0

Latest
Compare
Choose a tag to compare
@indyone indyone released this 29 Aug 13:55

Almost a complete re-write, can be used in-place (in most cases) and has the following changes:

  • Works with latest Elixir (> v1.4) & Erlang (> v19) *.
  • Use Erlang's :rand.uniform/1 function. This function by default uses the exrop
    algorithm which is not a secure PRNG, so for security stuff you may need to seed
    before using something like crypto:rand_seed/0.
  • Added documentation generated with ex_doc and static code analysis report with credo & dialyzer.
  • Added Misc.Random.string/2 which allows custom characters to be used instead of the default one (a-z, A-Z & 0-9).
  • Fixed issue with Misc.Random.number/1 which may return number shorter than length.
  • Removed compiler warnings.
  • Removed functions Misc.Random.seed_random/0, Misc.Random.get_string/1 and Misc.Random.get_number/1 as it seemed the usage was private *.
  • Few code optimizations.

* This change may break compatibility with original project.