View Source cerck (cerck v0.1.5)

Link to this section Summary

Functions

Test for weak or predictable passwords

Test for weak or predictable passwords, specifying the dictionary path

Get the cracklib dictionary path

Test password for character types
Test password for character types specifying a minimum number
Analyze a password

Link to this section Types

-type passwd_quality() :: #passwd_quality{}.

Link to this section Functions

-spec check(iodata()) -> ok | {error, string()}.

Test for weak or predictable passwords

 1> cerck:check(<<"foobar">>).
 {error,"it is based on a dictionary word"}
 2> cerck:check(<<"f00b4r">>).
 ok
-spec check(iodata(), iodata()) -> ok | {error, string()}.
Test for weak or predictable passwords, specifying the dictionary path
-spec dictpath() -> string().

Get the cracklib dictionary path

Returns the base path and filename prefix to the cracklib database.
-spec has(lower | number | other | upper, passwd_quality()) -> boolean().
Test password for character types
Link to this function

has(Type, Passwd_quality, Min)

View Source
-spec has(lower | number | other | upper, passwd_quality(), non_neg_integer()) -> boolean().
Test password for character types specifying a minimum number
-spec quality(string() | binary()) -> passwd_quality().
Analyze a password