Pbkdf2.Base.hash_password

You're seeing just the function hash_password, go back to Pbkdf2.Base module for more information.
Link to this function

hash_password(password, salt, opts \\ [])

View Source

Specs

hash_password(binary(), binary(), keyword()) :: binary()

Hash a password using Pbkdf2.

Options

There are four options (rounds can be used to override the value in the config):

  • :rounds - the number of rounds
    • the amount of computation, given in number of iterations
    • the default is 160_000
    • this can also be set in the config file
  • :format - the output format of the hash
    • the default is :modular - modular crypt format
    • the other available formats are:
      • :django - the format used in django applications
      • :hex - the hash is encoded in hexadecimal
  • :digest - the sha algorithm that pbkdf2 will use
    • the default is sha512
  • :length - the length, in bytes, of the hash
    • the default is 64 for sha512 and 32 for sha256