Nf.Crypto (neo_faker v0.6.1)
View SourceProvides functions for generating cryptographic hashes.
Options
The accepted options are:
:case
- Specifies the character case of the output.
The values for :case
can be:
:lower
(default) - Uses lowercase characters.:upper
- Uses uppercase characters.
Summary
Functions
Generates a random MD5 hash.
Generates a random SHA-1 hash.
Generates a random SHA-256 hash.
Functions
Generates a random MD5 hash.
Returns a random MD5 hash string.
See the module documentation for available options.
Examples
iex> Nf.Crypto.md5()
"e35cb102765cfc56df21ba4c16e6a636"
Generates a random SHA-1 hash.
Returns a random SHA-1 hash string.
See the module documentation for available options.
Examples
iex> Nf.Crypto.sha1()
"c8719790cdfff41c37c75e0c848d2b57535255aa"
Generates a random SHA-256 hash.
Returns a random SHA-256 hash string.
See the module documentation for available options.
Examples
iex> Nf.Crypto.sha256()
"d0ff021e810fb8f3442a14393604b0661b02f0dfcb347d80c9580af3ab5e7e6c"