line |
true |
false |
branch |
40
|
18 |
0 |
if (@$args != 0) |
41
|
0 |
18 |
if (ref $args->[0] eq 'HASH') { } |
|
18 |
0 |
elsif (not scalar(@$args) % 2) { } |
60
|
18 |
1 |
if ($digits and $digits =~ /^[68]$/) { } |
|
1 |
0 |
elsif (not defined $self->{'digits'} && $self->{'digits'} =~ /^[68]$/) { } |
72
|
0 |
19 |
if ($period and $period =~ /^[36]0$/) { } |
|
1 |
18 |
elsif (not defined $self->{'period'} && $self->{'period'} =~ /^[36]0$/) { } |
84
|
2 |
19 |
if ($algorithm and $algorithm =~ /^SHA\d+$/) { } |
|
1 |
18 |
elsif (not defined $self->{'algorithm'} && $self->{'algorithm'} =~ /^SHA\d+$/) { } |
96
|
18 |
1 |
if ($when and $when =~ /^\-?\d+$/) { } |
|
1 |
0 |
elsif (not defined $self->{'when'} && $self->{'when'} =~ /^\-?\d+$/) { } |
108
|
18 |
1 |
if ($tolerance and $tolerance =~ /^\d+$/ and $tolerance > 0) { } |
|
1 |
0 |
elsif (not defined $self->{'tolerance'} && $self->{'tolerance'} =~ /^\d+$/) { } |
120
|
18 |
1 |
if ($secret) { } |
|
0 |
1 |
elsif ($base32secret) { } |
127
|
0 |
1 |
if (defined $self->{'base32secret'}) { } |
131
|
1 |
0 |
if (defined $self->{'algorithm'}) { } |
132
|
0 |
1 |
if ($self->{'algorithm'} eq 'SHA512') { } |
|
0 |
1 |
elsif ($self->{'algorithm'} eq 'SHA256') { } |
171
|
0 |
18 |
if ((eval {
do {
require Digest::SHA;
1
}
} || 0) ne 1) { } |
174
|
0 |
0 |
if $self->{'DEBUG'} |
175
|
0 |
0 |
if ($self->{'algorithm'} eq 'SHA512') { } |
|
0 |
0 |
elsif ($self->{'algorithm'} eq 'SHA256') { } |
187
|
0 |
18 |
if $self->{'DEBUG'} |
188
|
6 |
12 |
if ($self->{'algorithm'} eq 'SHA512') { } |
|
6 |
6 |
elsif ($self->{'algorithm'} eq 'SHA256') { } |
203
|
19 |
0 |
if ((eval {
do {
require MIME::Base32::XS;
1
}
} || 0) ne 1) { } |
206
|
0 |
19 |
if $self->{'DEBUG'} |
211
|
0 |
0 |
if $self->{'DEBUG'} |
219
|
0 |
0 |
if ((eval {
do {
require MIME::Base32::XS;
1
}
} || 0) ne 1) { } |
222
|
0 |
0 |
if $self->{'DEBUG'} |
227
|
0 |
0 |
if $self->{'DEBUG'} |
240
|
1 |
0 |
if (length $secret > $length + 1) |
241
|
0 |
1 |
if $self->{'DEBUG'} |
252
|
0 |
0 |
unless ($user) |
261
|
0 |
0 |
if ($issuer) { } |
281
|
0 |
18 |
unless ($otp and $otp =~ /^\d{6,8}$/) |
300
|
0 |
18 |
if $self->{'DEBUG'} |
314
|
0 |
18 |
if $self->{'DEBUG'} |
316
|
18 |
0 |
if ($code eq sprintf('%0' . $self->{'digits'} . 'd', $otp)) |
330
|
0 |
1 |
if (@_ != 0) |
331
|
0 |
0 |
if (ref $_[0] eq 'HASH') { } |
|
0 |
0 |
elsif (not scalar(@_) % 2) { } |