]> Entropealabs - wampex.git/commitdiff
fix password hashing function
authorChristopher Coté <chris@entropealabs.com>
Sun, 5 Jan 2025 20:26:18 +0000 (15:26 -0500)
committerChristopher Coté <chris@entropealabs.com>
Sun, 5 Jan 2025 20:26:18 +0000 (15:26 -0500)
lib/crypto.ex

index 7731f67ac16744bb0e4b4f5000b07439ff9086b7..97132ad04bb9154fd9d26d6c32a6fc66e6974f76 100644 (file)
@@ -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