---
name: "Data::Password::zxcvbn::Match::Spatial"
section: "3pm"
platform: "linux"
package: "libdata-password-zxcvbn-perl"
version: "1.1.2-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Data::Password::zxcvbn::Match::Spatial"
---

# Data::Password::zxcvbn::Match::Spatial(3pm)

match class for sequences of nearby keys

## NAME

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

## VERSION

version 1.1.2

## 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.

## 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

## 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"`.

## AUTHOR

Gianni Ceccarelli \<gianni.ceccarelli@broadbean.com\>

## COPYRIGHT AND LICENSE

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.
