[% score = passwd_check.score;
class = score < 2
? 'error'
: score < 3
? 'warning'
: 'info';
%]
Password length: [% results.password_length %] characters
Estimated number of guesses to crack: [%
IF results.guesses_int < 100; 'not many'; # possible security risk in displaying it ?
ELSIF results.guesses_int < 1000000; results.guesses_int; # < 100_000
ELSIF results.guesses_int < 1000000000; results.guesses_num2en; # < billion
ELSE; USE Math; '10'; Math.int(results.guesses_log10); '';
END %]
Estimated crack-times:
[% ct = results.estimated_crack_times %]
Online attack (10/sec): [% ct.online.unthrottled %]
Offline attack against strongly encrypted passwords (10 thousand/sec):
[% ct.offline.slow_hash %]
Offline attack against weakly encrypted passwords (10 billion/sec):
[% ct.offline.fast_hash %]
[% # also have online throttled attack & offline against fast-hash passwords: %]
[% IF passwd_check.feedback.warning # str %]
Warning:
[% passwd_check.feedback.warning %]
[% END %]
[% IF passwd_check.feedback.suggestions.size # array %]
Suggestions:
[% FOREACH i IN passwd_check.feedback.suggestions %]
[% i %]
[% END %]
[% END %]
[% IF passwd_check.score < 3 %]
[% END %]