Skip to content

Commit

Permalink
Merge d9d2fb6 into 603d7f3
Browse files Browse the repository at this point in the history
  • Loading branch information
danielberkompas committed Jun 5, 2021
2 parents 603d7f3 + d9d2fb6 commit 62d5b31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lib/cloak_ecto/types/pbkdf2.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ if Code.ensure_loaded?(:pbkdf2) do
{:pbkdf2, "~> 2.0"}
If you are using Erlang >= 24, you will need to use a forked version,
because `pbkdf2` version `2.0.0` uses `:crypto.hmac` functions that were
removed in Erlang 24.
{:pbkdf2, "~> 2.0", github: "miniclip/erlang-pbkdf2"}
## Configuration
Create a `PBKDF2` field in your project:
Expand Down
7 changes: 5 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ defmodule Cloak.Ecto.MixProject do
[
{:cloak, "~> 1.1.1"},
{:ecto, "~> 3.0"},
# Must use a forked version of pbkdf2 to support Erlang 24
# Must use a forked version of pbkdf2 to support Erlang 24. Because Hex only
# allows hex packages to be dependencies, this dep cannot be listed as an
# optional dependency anymore.
#
# See https://github.com/basho/erlang-pbkdf2/pull/12
{:pbkdf2, "~> 2.0", optional: true, github: "miniclip/erlang-pbkdf2"},
{:pbkdf2, "~> 2.0", github: "miniclip/erlang-pbkdf2", only: [:dev, :test]},
{:ex_doc, ">= 0.0.0", only: :dev},
{:excoveralls, ">= 0.0.0", only: :test},
{:ecto_sql, ">= 0.0.0", only: [:dev, :test]},
Expand Down

0 comments on commit 62d5b31

Please sign in to comment.