Fix test cases for the pwhash_str_* calls

This commit is contained in:
Jesper Louis Andersen 2018-05-20 19:36:31 +02:00
parent 3407433443
commit 0c5acd2fba

View File

@ -486,11 +486,12 @@ prop_pwhash_str_verify() ->
begin begin
case v_iodata(Passwd) of case v_iodata(Passwd) of
true -> true ->
{K, P} = enacl:pwhash_str(Passwd), {ok, Ascii} = enacl:pwhash_str(Passwd),
S = enacl:pwhash_str_verify(P, Passwd), S = enacl:pwhash_str_verify(Ascii, Passwd),
equals(S, true); equals(S, true);
false -> false ->
badargs(fun() -> enacl:pwhash_str_verify(Passwd) end) badargs(fun() -> enacl:pwhash_str(Passwd) end),
badargs(fun() -> enacl:pwhash_str_verify("", Passwd) end)
end end
end). end).