File Coverage

blib/lib/Data/Password/zxcvbn/AdjacencyGraph/Common.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Data::Password::zxcvbn::AdjacencyGraph::Common;
2 3     3   20 use strict;
  3         8  
  3         93  
3 3     3   17 use warnings;
  3         6  
  3         906  
4             # VERSION
5             # ABSTRACT: adjacency graphs for common keyboards
6              
7             =head1 DESCRIPTION
8              
9             This is a data file used by L<<
10             C<Data::Password::zxcvbn::Match::Spatial> >>, and is generated by the
11             L<<
12             C<build-keyboard-adjacency-graphs>|https://bitbucket.org/broadbean/p5-data-password-zxcvbn/src/master/maint/build-keyboard-adjacency-graphs
13             >> program when building the distribution.
14              
15              
16             =cut
17              
18             our %graphs = (
19             keypad => {
20             average_degree => 5.06666666666667,
21             keys => {
22             "*" => [
23             '/', ( undef ) x 3, '-', '+', 9, 8
24             ],
25             "+" => [
26             9, '*', '-', ( undef ) x 4, 6
27             ],
28             "-" => [
29             '*', ( undef ) x 5, '+', 9
30             ],
31             "." => [
32             0, 2, 3, ( undef ) x 5
33             ],
34             "/" => [
35             ( undef ) x 4, '*', 9, 8, 7
36             ],
37             0 => [
38             undef, 1, 2, 3, '.', ( undef ) x 3
39             ],
40             1 => [
41             ( undef ) x 2, 4, 5, 2, 0, ( undef ) x 2
42             ],
43             2 => [
44             1, 4, 5, 6, 3, '.', 0, undef
45             ],
46             3 => [
47             2, 5, 6, ( undef ) x 3, '.', 0
48             ],
49             4 => [
50             ( undef ) x 2, 7, 8, 5, 2, 1, undef
51             ],
52             5 => [
53             4, 7, 8, 9, 6, 3, 2, 1
54             ],
55             6 => [
56             5, 8, 9, '+', ( undef ) x 2, 3, 2
57             ],
58             7 => [
59             ( undef ) x 3, '/', 8, 5, 4, undef
60             ],
61             8 => [
62             7, undef, '/', '*', 9, 6, 5, 4
63             ],
64             9 => [
65             8, '/', '*', '-', '+', undef, 6, 5
66             ]
67             },
68             starting_positions => 15
69             },
70             mac_keypad => {
71             average_degree => 5.25,
72             keys => {
73             "*" => [
74             '/', ( undef ) x 5, '-', 9
75             ],
76             "+" => [
77             6, 9, '-', ( undef ) x 4, 3
78             ],
79             "-" => [
80             9, '/', '*', ( undef ) x 3, '+', 6
81             ],
82             "." => [
83             0, 2, 3, ( undef ) x 5
84             ],
85             "/" => [
86             '=', ( undef ) x 3, '*', '-', 9, 8
87             ],
88             0 => [
89             undef, 1, 2, 3, '.', ( undef ) x 3
90             ],
91             1 => [
92             ( undef ) x 2, 4, 5, 2, 0, ( undef ) x 2
93             ],
94             2 => [
95             1, 4, 5, 6, 3, '.', 0, undef
96             ],
97             3 => [
98             2, 5, 6, '+', ( undef ) x 2, '.', 0
99             ],
100             4 => [
101             ( undef ) x 2, 7, 8, 5, 2, 1, undef
102             ],
103             5 => [
104             4, 7, 8, 9, 6, 3, 2, 1
105             ],
106             6 => [
107             5, 8, 9, '-', '+', undef, 3, 2
108             ],
109             7 => [
110             ( undef ) x 3, '=', 8, 5, 4, undef
111             ],
112             8 => [
113             7, undef, '=', '/', 9, 6, 5, 4
114             ],
115             9 => [
116             8, '=', '/', '*', '-', '+', 6, 5
117             ],
118             "=" => [
119             ( undef ) x 4, '/', 9, 8, 7
120             ]
121             },
122             starting_positions => 16
123             }
124             )
125             ;
126              
127             1;