| line |
true |
false |
branch |
|
41
|
36 |
0 |
if (@$args != 0) |
|
42
|
36 |
0 |
if (ref $args->[0] eq 'HASH') { } |
|
|
0 |
0 |
elsif (not scalar(@$args) % 2) { } |
|
61
|
36 |
19 |
if ($digits and $digits =~ /^[68]$/) { } |
|
|
1 |
18 |
elsif (not defined $self->{'digits'} && $self->{'digits'} =~ /^[68]$/) { } |
|
73
|
0 |
55 |
if ($period and $period =~ /^[36]0$/) { } |
|
|
19 |
36 |
elsif (not defined $self->{'period'} && $self->{'period'} =~ /^[36]0$/) { } |
|
85
|
20 |
55 |
if ($algorithm and $algorithm =~ /^SHA\d+$/) { } |
|
|
19 |
36 |
elsif (not defined $self->{'algorithm'} && $self->{'algorithm'} =~ /^SHA\d+$/) { } |
|
97
|
36 |
19 |
if ($when and $when =~ /^\-?\d+$/) { } |
|
|
1 |
18 |
elsif (not defined $self->{'when'} && $self->{'when'} =~ /^\-?\d+$/) { } |
|
109
|
36 |
19 |
if ($tolerance and $tolerance =~ /^\d+$/ and $tolerance > 0) { } |
|
|
1 |
18 |
elsif (not defined $self->{'tolerance'} && $self->{'tolerance'} =~ /^\d+$/) { } |
|
121
|
54 |
19 |
if ($secret) { } |
|
|
0 |
19 |
elsif ($base32secret) { } |
|
128
|
0 |
19 |
if (defined $self->{'base32secret'}) { } |
|
132
|
19 |
0 |
if (defined $self->{'algorithm'}) { } |
|
133
|
0 |
19 |
if ($self->{'algorithm'} eq 'SHA512') { } |
|
|
0 |
19 |
elsif ($self->{'algorithm'} eq 'SHA256') { } |
|
172
|
0 |
54 |
if ((eval {
do {
require Digest::SHA;
1
}
} || 0) ne 1) { } |
|
175
|
0 |
0 |
if $self->{'DEBUG'} |
|
176
|
0 |
0 |
if ($self->{'algorithm'} eq 'SHA512') { } |
|
|
0 |
0 |
elsif ($self->{'algorithm'} eq 'SHA256') { } |
|
188
|
0 |
54 |
if $self->{'DEBUG'} |
|
189
|
18 |
36 |
if ($self->{'algorithm'} eq 'SHA512') { } |
|
|
18 |
18 |
elsif ($self->{'algorithm'} eq 'SHA256') { } |
|
204
|
73 |
0 |
if ((eval {
do {
require Encode::Base2N;
1
}
} || 0) ne 1) { } |
|
207
|
0 |
73 |
if $self->{'DEBUG'} |
|
212
|
0 |
0 |
if $self->{'DEBUG'} |
|
220
|
0 |
0 |
if ((eval {
do {
require Encode::Base2N;
1
}
} || 0) ne 1) { } |
|
223
|
0 |
0 |
if $self->{'DEBUG'} |
|
228
|
0 |
0 |
if $self->{'DEBUG'} |
|
239
|
0 |
19 |
if (length $secret > $length + 1) |
|
240
|
0 |
0 |
if $self->{'DEBUG'} |
|
251
|
0 |
0 |
unless ($user) |
|
260
|
0 |
0 |
if ($issuer) { } |
|
280
|
0 |
36 |
unless ($otp and $otp =~ /^\d{6,8}$/) |
|
299
|
0 |
36 |
if $self->{'DEBUG'} |
|
303
|
0 |
36 |
if $self->{'DEBUG'} |
|
305
|
36 |
0 |
if ($code eq sprintf('%0' . $self->{'digits'} . 'd', $otp)) |
|
323
|
0 |
54 |
unless (defined $when) |
|
347
|
18 |
1 |
if (@_ != 0) |
|
348
|
18 |
0 |
if (ref $_[0] eq 'HASH') { } |
|
|
0 |
0 |
elsif (not scalar(@_) % 2) { } |