Fields.Helpers (fields v2.9.0)

Helper functions for hashing, generating (random) salt values and fetching secrets form environment.

Link to this section Summary

Functions

Hash a string, or a value that implements the String.Chars protocol, using Argon2. Argon2 is a strong but slow hashing function, so is recommended for passwords.

Link to this section Functions

Link to this function

hash(atom, value)

@spec hash(atom(), String.Chars.t()) :: String.t()
@spec hash(atom(), String.Chars.t()) :: String.t()

Hash a string, or a value that implements the String.Chars protocol, using Argon2. Argon2 is a strong but slow hashing function, so is recommended for passwords.