Created
April 4, 2018 23:08
-
-
Save P-Seebauer/b7144d3fb4a47bc1ee3066cb161a965d to your computer and use it in GitHub Desktop.
problem with dialyzer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Argon2Test do | |
@hash_for_foo "$argon2i$v=19$m=65536,t=6,p=1$dxSBP76R4icBDzu06CJRBQ$q4v8CePvqsdbSNBjBS0RRibryQI3Xo6ahYSqUZbdNaI" | |
@spec test_pass(String.t) :: (:failed | {:ok, map()}) | |
def test_pass(pass) do | |
db_user = %{password_hash: @hash_for_foo} | |
with {:ok, ^db_user} <- Comeonin.Argon2.check_pass(db_user, pass) do | |
{:ok, db_user} | |
else | |
_ -> :failed | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Argon2Test.MixProject do | |
use Mix.Project | |
def project do | |
[ | |
app: :argon2_test, | |
version: "0.1.0", | |
elixir: "~> 1.6", | |
start_permanent: Mix.env() == :prod, | |
deps: deps(), | |
dialyzer: [ | |
plt_add_deps: :transitive, | |
] | |
] | |
end | |
# Run "mix help compile.app" to learn about applications. | |
def application do | |
[extra_applications: [:logger]] | |
end | |
# Run "mix help deps" to learn about dependencies. | |
defp deps do | |
[ | |
{:comeonin, "~> 4.1"}, | |
{:argon2_elixir, "~> 1.2"}, | |
{:dialyxir, "~> 0.5", only: [:dev], runtime: false}, | |
] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I came here from your Stack Overflow question. Did you ever find a way around this? I'm having a very similar error.