Fix test cases for the pwhash_str_* calls
This commit is contained in:
parent
3407433443
commit
0c5acd2fba
@ -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).
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user