On my latest Elixir project, I decided to give argon2_elixir a try for password hashing. The latest release of comeonin moved the API into the encryption libraries themselves and turned the
comeonin API into a low-level macro.
Enough with the background. When using BCrypt it is well-known that you can reduce the number of hashes to speed up your tests, but how do you accomplish the same with Argon2?
config :argon2_elixir, t_cost: 1, m_cost: 8
This simple change reduced a 2.1 second test suite to 0.2 seconds. These are the lowest values you can use for Argon2. Any lower will throw an exception.