From fdd0962a43ccff2d7e6282529c328c0fbaaf851a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christopher=20Cot=C3=A9?= Date: Sun, 5 Jan 2025 15:26:18 -0500 Subject: [PATCH] fix password hashing function --- lib/crypto.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/crypto.ex b/lib/crypto.ex index 7731f67..97132ad 100644 --- a/lib/crypto.ex +++ b/lib/crypto.ex @@ -10,8 +10,8 @@ defmodule Wampex.Crypto do end def pbkdf2(secret, salt, iterations, keylen) do - secret - |> Pbkdf2.Base.hash_password(salt, rounds: iterations, length: keylen) + :sha256 + |> :crypto.pbkdf2_hmac(secret, salt, iterations, keylen) |> Base.encode64() end -- 2.45.3