Euclid.Extra.Random (Euclid v0.2.4) View Source

Helpers for generating random data in whatever format

Link to this section Summary

Functions

Returns a base64 encoded string of given length

Link to this section Functions

Link to this function

string(character_count \\ 32)

View Source

Specs

string(character_count :: pos_integer()) :: binary()

Returns a base64 encoded string of given length

Examples

iex> Euclid.Extra.Random.string()
"Sr/y4m/YiVSJcIgI5lG+76vMfaZ7KZ7c"
iex> Euclid.Extra.Random.string(5)
"9pJrK"