line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Password::zxcvbn::French; |
2
|
1
|
|
|
1
|
|
227980
|
use strict; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
29
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
469
|
use Data::Password::zxcvbn; |
|
1
|
|
|
|
|
75314
|
|
|
1
|
|
|
|
|
49
|
|
5
|
1
|
|
|
1
|
|
8
|
use Exporter 'import'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
157
|
|
6
|
|
|
|
|
|
|
our @EXPORT_OK=qw(password_strength); |
7
|
|
|
|
|
|
|
our $VERSION = '1.0.2'; # VERSION |
8
|
|
|
|
|
|
|
# ABSTRACT: Dropbox's password estimation logic, with French defaults |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub password_strength { |
12
|
5
|
|
|
5
|
0
|
98522
|
my ($password, $opts) = @_; |
13
|
|
|
|
|
|
|
|
14
|
5
|
|
50
|
|
|
11
|
my %actual_opts = %{$opts // {}}; |
|
5
|
|
|
|
|
36
|
|
15
|
5
|
|
33
|
|
|
25
|
$actual_opts{ranked_dictionaries} //= do { |
16
|
5
|
|
|
|
|
502
|
require Data::Password::zxcvbn::French::RankedDictionaries; |
17
|
5
|
|
|
|
|
28
|
\%Data::Password::zxcvbn::French::RankedDictionaries::ranked_dictionaries; |
18
|
|
|
|
|
|
|
}; |
19
|
5
|
|
33
|
|
|
24
|
$actual_opts{graphs} //= do { |
20
|
5
|
|
|
|
|
764
|
require Data::Password::zxcvbn::French::AdjacencyGraph; |
21
|
5
|
|
|
|
|
19
|
\%Data::Password::zxcvbn::French::AdjacencyGraph::graphs; |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
5
|
|
|
|
|
20
|
return Data::Password::zxcvbn::password_strength( |
25
|
|
|
|
|
|
|
$password, |
26
|
|
|
|
|
|
|
\%actual_opts, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding UTF-8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Data::Password::zxcvbn::French - Dropbox's password estimation logic, with French defaults |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 1.0.2 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 SYNOPSIS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
use Data::Password::zxcvbn::French qw(password_strength); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
my $strength = password_strength($my_password); |
51
|
|
|
|
|
|
|
warn $strength->{warning} if $strength->{score} < 3; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 DESCRIPTION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
This is a variant of L<< C<Data::Password::zxcvbn> >> with French |
56
|
|
|
|
|
|
|
data. See that distribution for all the documentation. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=for Pod::Coverage password_strength |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHOR |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Gianni Ceccarelli <gianni.ceccarelli@broadbean.com> |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This software is copyright (c) 2023 by BroadBean UK, a CareerBuilder Company. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
69
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |