logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Data::Password::zxcvbn::Match::Spatial - match class for sequences of nearby keys

Attributes

"graph_name"
       The name of the keyboard / adjacency graph used for this match

   "graph_meta"
       Hashref, spatial information about the graph:

       •   "starting_positions"

           the number of keys in the keyboard, or starting nodes in the graph

       •   "average_degree"

           the average number of neighbouring keys, or average out-degree of the graph

   "shifted_count"
       How many of the keys need to be "shifted" to produce the token

   "turns"
       How many times the finger must have changed direction to produce the token

Author

       Gianni Ceccarelli <gianni.ceccarelli@broadbean.com>

Description

       This class represents the guess that a certain substring of a password can be obtained by moving a finger
       in a continuous line on a keyboard.

Methods

"estimate_guesses"
       The number of guesses grows super-linearly with the length of the pattern, the number of "turns", and the
       amount of shifted keys.

   "make"
         my @matches = @{ Data::Password::zxcvbn::Match::Spatial->make(
           $password,
           { # this is the default
             graphs => \%Data::Password::zxcvbn::AdjacencyGraph::graphs,
           },
         ) };

       Scans  the  $password  for  substrings  that  can be produced by typing on the keyboards described by the
       "graphs".

       The   data   structure   needed    for    "graphs"    is    a    bit    complicated;    look    at    the
       "build-keyboard-adjacency-graphs"        script        in       the       distribution's       repository
       <https://bitbucket.org/broadbean/p5-data-password-zxcvbn/src/master/maint/build-keyboard-adjacency-
       graphs>.

   "feedback_warning""feedback_suggestions"
       This class suggests that short keyboard patterns are easy to guess, and to use longer and  less  straight
       ones.

   "fields_for_json"
       The JSON serialisation for matches of this class will contain "token i j guesses guesses_log10 graph_name
       shifted_count turns".

Name

       Data::Password::zxcvbn::Match::Spatial - match class for sequences of nearby keys

Version

       version 1.1.2

See Also