mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-28 22:07:59 +01:00
13 lines
396 B
Elixir
13 lines
396 B
Elixir
defmodule Philomena.Users.Password do
|
|
def hash_pwd_salt(password, opts \\ []) do
|
|
Bcrypt.hash_pwd_salt(<<password::binary, password_pepper()::binary>>, opts)
|
|
end
|
|
|
|
def verify_pass(password, stored_hash) do
|
|
Bcrypt.verify_pass(<<password::binary, password_pepper()::binary>>, stored_hash)
|
|
end
|
|
|
|
defp password_pepper do
|
|
Application.get_env(:philomena, :password_pepper)
|
|
end
|
|
end
|