diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-12-05 16:42:17 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-12-05 16:42:17 +0100 |
commit | e5c01e102c790a918ecfda66cfce7cb5e5f8af0a (patch) | |
tree | d2ab239d8a3d664c793b3d35fd34e9f0030cede2 /info | |
parent | add description of strength value (diff) | |
download | libpassphrase-e5c01e102c790a918ecfda66cfce7cb5e5f8af0a.tar.gz libpassphrase-e5c01e102c790a918ecfda66cfce7cb5e5f8af0a.tar.bz2 libpassphrase-e5c01e102c790a918ecfda66cfce7cb5e5f8af0a.tar.xz |
customisable meter
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'info')
-rw-r--r-- | info/libpassphrase.texinfo | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/info/libpassphrase.texinfo b/info/libpassphrase.texinfo index 8b76067..7d46aaa 100644 --- a/info/libpassphrase.texinfo +++ b/info/libpassphrase.texinfo @@ -458,7 +458,35 @@ make OPTIONS=PASSPHRASE_METER \ LIBPASSPHRASE_STRENGTH_LABEL="Hope meter:" @end example - +@item @code{PASSPHRASE_STRENGTH_LIMITS_HEADER} +A header file to include that defines the macro +@code{LIST_PASSPHRASE_STRENGTH_LIMITS}. If used, +this value should either be a system header file and +enclosed in ASCII angle brackets, or a local header +file relative to the @file{src/passphrase_helper.h} +and enclosed in ASCII double quotes. + +The @code{LIST_PASSPHRASE_STRENGTH_LIMITS} should +be define similar to +@example +#define LIST_PASSPHRASE_STRENGTH_LIMITS(V) \ + X(V == 0, "1;31", "Well-known common password") \ + X(V <= 150, "31", "Extremely week") \ + X(V <= 200, "33", "Week") \ + X(V <= 250, "32", "Good") \ + X(V <= 350, "1;32", "Strong") \ + X(1, "1;7;32", "Perfect") +@end example +The macro @code{X} is defined when the macro +[@code{LIST_PASSPHRASE_STRENGTH_LIMITS}] is used. +Its first argument should evalute to truth if +@code{V} from @code{LIST_PASSPHRASE_STRENGTH_LIMITS} +can be designed in the string in the third argument. +It is important that it [the first argument] always +evaluates to truth for the last expansion of the macro +[@code{X}]. The second argument is the Select Graphic +Rendition parameters --- semi-colon separate -- used +to colour the description (the third argument). @end table |