.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Data::Password::zxcvbn::MatchList 3pm" .TH Data::Password::zxcvbn::MatchList 3pm "2020-07-13" "perl v5.30.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Data::Password::zxcvbn::MatchList \- a collection of matches for a password .SH "VERSION" .IX Header "VERSION" version 1.0.4 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Data::Password::zxcvbn::MatchList; \& \& my $list = Data::Password::zxcvbn::MatchList\->omnimatch($password) \& \->most_guessable_match_list; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" zxcvbn estimates the strength of a password by guessing which way a generic password cracker would produce it, and then guessing after how many tries it would produce it. .PP This class represents a list of guesses (\*(L"matches\*(R"), covering different substrings of a password. .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" .ie n .SS """password""" .el .SS "\f(CWpassword\fP" .IX Subsection "password" Required string, the password this list is about. .ie n .SS """matches""" .el .SS "\f(CWmatches\fP" .IX Subsection "matches" Arrayref, the actual list of matches. .ie n .SS """guesses""" .el .SS "\f(CWguesses\fP" .IX Subsection "guesses" The estimated number of attempts that a generic password cracker would need to guess the whole \*(L"password\*(R". This will be set for objects returned by "\f(CW\*(C`most_guessable_match_list\*(C'\fR", not for those returned by "\f(CW\*(C`omnimatch\*(C'\fR". .SH "METHODS" .IX Header "METHODS" .ie n .SS """omnimatch""" .el .SS "\f(CWomnimatch\fP" .IX Subsection "omnimatch" .Vb 1 \& my $match_list = Data::Password::zxcvbn::MatchList\->omnimatch($password,\e%opts); .Ve .PP Main constructor (the name comes from the original \s-1JS\s0 implementation). Calls \f(CW\*(C`\->make($password,\e%opts)\*(C'\fR on all the \&\f(CW\*(C`Data::Password::zxcvbn::Match::*\*(C'\fR classes (or the ones in \f(CW\*(C`@{$opts{modules}}\*(C'\fR), combines all the matches, and returns a \&\f(CW\*(C`MatchList\*(C'\fR holding them. .ie n .SS """most_guessable_match_list""" .el .SS "\f(CWmost_guessable_match_list\fP" .IX Subsection "most_guessable_match_list" .Vb 1 \& my $minimal_list = $match_list\->most_guessable_match_list; .Ve .PP This method extracts, from the \*(L"matches\*(R" of the invocant, a list of non-overlapping matches with minimum guesses. That list should represent the way that a generic password cracker would guess the \&\*(L"password\*(R", and as such is the one that the main function will use. .ie n .SS """guesses_log10""" .el .SS "\f(CWguesses_log10\fP" .IX Subsection "guesses_log10" The logarithm in base 10 of "\f(CW\*(C`guesses\*(C'\fR". .ie n .SS """score""" .el .SS "\f(CWscore\fP" .IX Subsection "score" .Vb 1 \& my $score = $match_list\->score; .Ve .PP Returns an integer from 0\-4 (useful for implementing a strength bar). See \f(CW\*(C`Data::Password::zxcvbn::TimeEstimate::guesses_to_score\*(C'\fR. .ie n .SS """get_feedback""" .el .SS "\f(CWget_feedback\fP" .IX Subsection "get_feedback" .Vb 1 \& my %feedback = %{ $match_list\->get_feedback }; \& \& my %feedback = %{ $match_list\->get_feedback($max_score_for_feedback) }; .Ve .PP If there's no matches, returns the result of "\f(CW\*(C`feedback_for_no_matches\*(C'\fR". .PP If the match list \*(L"score\*(R" is above \f(CW$max_score_for_feedback\fR (default 2), returns the result of "\f(CW\*(C`feedback_above_threshold\*(C'\fR". .PP Otherwise, collects all the feedback from the \*(L"matches\*(R", and returns it, merged with the result of "\f(CW\*(C`feedback_below_threshold\*(C'\fR" (suggestions are appended, but the warning from the matches takes precendence). .ie n .SS """feedback_for_no_matches""" .el .SS "\f(CWfeedback_for_no_matches\fP" .IX Subsection "feedback_for_no_matches" Returns a feedback for when the password didn't match any of our heuristics. It contains no warning, and some simple common suggestions. .ie n .SS """feedback_above_threshold""" .el .SS "\f(CWfeedback_above_threshold\fP" .IX Subsection "feedback_above_threshold" Returns a feedback for when the password scored above the threshold passed to "\f(CW\*(C`get_feedback\*(C'\fR" (i.e. the password is \*(L"good\*(R"). It's an empty feedback. .ie n .SS """feedback_below_threshold""" .el .SS "\f(CWfeedback_below_threshold\fP" .IX Subsection "feedback_below_threshold" Returns a feedback for when the password scored below the threshold passed to "\f(CW\*(C`get_feedback\*(C'\fR" (i.e. the password is \*(L"bad\*(R"). It suggests to add some words. .SH "AUTHOR" .IX Header "AUTHOR" Gianni Ceccarelli .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2018 by BroadBean \s-1UK,\s0 a CareerBuilder Company. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.