.\" 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::Match::Regex 3pm" .TH Data::Password::zxcvbn::Match::Regex 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::Match::Regex \- match class for recognisable patterns in passwords .SH "VERSION" .IX Header "VERSION" version 1.0.4 .SH "DESCRIPTION" .IX Header "DESCRIPTION" This class represents the guess that a certain substring of a password can be guessed by enumerating small languages described by regular expressions. By default, the only regex used is one that matches recent years (yes, this is very similar to what \f(CW\*(C`Date\*(C'\fR does). .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" .ie n .SS """regexes""" .el .SS "\f(CWregexes\fP" .IX Subsection "regexes" Hashref, the regular expressions that were tried to get this match. The values are arrayrefs with 2 elements: the regex itself, and the estimated number of guesses per character; for example: .PP .Vb 1 \& digits => [ qr[(\ep{Nd}+)], 10 ], .Ve .ie n .SS """regex_name""" .el .SS "\f(CWregex_name\fP" .IX Subsection "regex_name" The name of the regex that matched the token. .SH "METHODS" .IX Header "METHODS" .ie n .SS """make""" .el .SS "\f(CWmake\fP" .IX Subsection "make" .Vb 6 \& my @matches = @{ Data::Password::zxcvbn::Match::Regex\->make( \& $password, \& { # this is the default \& regexes => \e%Data::Password::zxcvbn::Match::Regex::regexes_limited, \& }, \& ) }; .Ve .PP Scans the \f(CW$password\fR for substrings that match regexes in \&\f(CW\*(C`regexes\*(C'\fR. .PP By default, the only regex that's used is one that matches recent years expressed as 4 digits. More patterns are available as \&\f(CW\*(C`\e%Data::Password::zxcvbn::Match::Regex::regexes\*(C'\fR (which you can also get if you say \f(CW\*(C`regexes => \*(Aqall\*(Aq\*(C'\fR), or you can pass in your own hashref. .ie n .SS """estimate_guesses""" .el .SS "\f(CWestimate_guesses\fP" .IX Subsection "estimate_guesses" For the \f(CW\*(C`recent_year\*(C'\fR regex, the number of guesses is the number of years between the value represented by the token and a reference year (currently 2017). .PP For all other regexes, the number of guesses is exponential on the length of the token, using as base the second element of the matching pattern (i.e. \f(CW\*(C`$self\->regexes\->{$self\->regex_name}[1]\*(C'\fR). .ie n .SS """feedback_warning""" .el .SS "\f(CWfeedback_warning\fP" .IX Subsection "feedback_warning" .ie n .SS """feedback_suggestions""" .el .SS "\f(CWfeedback_suggestions\fP" .IX Subsection "feedback_suggestions" This class suggests not using recent years. At the moment, there's no feedback for other regexes. .ie n .SS """fields_for_json""" .el .SS "\f(CWfields_for_json\fP" .IX Subsection "fields_for_json" The \s-1JSON\s0 serialisation for matches of this class will contain \f(CW\*(C`token i j guesses guesses_log10 regex_name\*(C'\fR. .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.