Data::...patial(3pm)

✨ NAME ✨

Data::Password::zxcvbn::Match::Spatial β€” the match class for when your password is literally just your fingers sliding around a keyboard πŸ’…

(also hi bestie, this is a page from the User Contributed Perl Documentation section, and yes it's a Perl module, we love her 🫢)

🌸 VERSION 🌸

version 1.1.3

πŸ’– DESCRIPTION πŸ’–

okay so. 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. that's it, that's the whole vibe. it's giving "qwertyuiop" and honestly? iconic of you to try, but we're gonna rate it πŸ”₯

πŸ¦‹ ATTRIBUTES πŸ¦‹

graph_name

the name of the keyboard / adjacency graph that got used for this match ✨

graph_meta

hashref, and it holds the spatial information about the graph, which is:

  • starting_positions β€” the number of keys in the keyboard, or the starting nodes in the graph 🌈
  • average_degree β€” the average number of neighbouring keys, or the average out-degree of the graph πŸŽ€

shifted_count

how many of the keys need to be "shifted" to produce the token. like how many of them needed a lil shift key assist, you know the struggle πŸ’…

turns

how many times the finger must have changed direction to produce the token. the more wandering around your keyboard does, the more this goes up πŸ™ˆ

πŸ‘‘ 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. so like, longer + twistier + shiftier = exponentially more guesses, no cap ⭐

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 ngl; 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. periodt πŸ’… (yes both of these are the same lil vibe, twinning fr fr)

fields_for_json

the JSON serialisation for matches of this class will contain token i j guesses guesses_log10 graph_name shifted_count turns ✨


πŸ’œ AUTHOR πŸ’œ

Gianni Ceccarelli <gianni.ceccarelli@broadbean.com>

this software is copyright (c) 2022 by BroadBean UK, a CareerBuilder Company. πŸ‘‘

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay πŸ’…

that's a wrap bestie!! πŸŽ€ this cutie was rendered by perl v5.40.1, dated 2025-10-17, and documented as Data::...patial(3pm) β€” go forth and don't use "qwertyuiop" as your password, ily 🫢
πŸ“¦ where this page comes from