Fix atom leak in password digest functionality
The value here gets passesd to :crypto.pbkdf2_hmac and it expects one of these atoms: :sha | :sha224 | :sha256 | :sha384 | :sha512 so it will always exist
This commit is contained in:
parent
79d69ce72a
commit
86e6d395d9
|
@ -28,7 +28,7 @@ def verify_pass(password, hash) do
|
|||
|
||||
iterations = String.to_integer(iterations)
|
||||
|
||||
digest = String.to_atom(digest)
|
||||
digest = String.to_existing_atom(digest)
|
||||
|
||||
binary_hash =
|
||||
KeyGenerator.generate(password, salt, digest: digest, iterations: iterations, length: 64)
|
||||
|
|
Loading…
Reference in New Issue