line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Passphrase::Validator; |
2
|
|
|
|
|
|
|
$Crypt::Passphrase::Validator::VERSION = '0.015'; |
3
|
3
|
|
|
3
|
|
1361
|
use strict; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
81
|
|
4
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
361
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub secure_compare { |
7
|
3
|
|
|
3
|
1
|
16
|
my ($self, $left, $right) = @_; |
8
|
3
|
50
|
|
|
|
36
|
return if length $left != length $right; |
9
|
3
|
|
|
|
|
7
|
my $r = 0; |
10
|
3
|
|
|
|
|
133
|
$r |= ord(substr $left, $_, 1) ^ ord(substr $right, $_, 1) for 0 .. length($left) - 1; |
11
|
3
|
50
|
|
|
|
70
|
return $r == 0 ? 1 : undef; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
1; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
#ABSTRACT: Base class for Crypt::Passphrase validators |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__END__ |