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'}) { } |
154
|
0 |
18 |
if ((eval {
do {
require Digest::SHA;
1
}
} || 0) ne 1) { } |
157
|
0 |
0 |
if $self->{'DEBUG'} |
158
|
0 |
0 |
if ($self->{'algorithm'} eq 'SHA512') { } |
|
0 |
0 |
elsif ($self->{'algorithm'} eq 'SHA256') { } |
170
|
0 |
18 |
if $self->{'DEBUG'} |
171
|
6 |
12 |
if ($self->{'algorithm'} eq 'SHA512') { } |
|
6 |
6 |
elsif ($self->{'algorithm'} eq 'SHA256') { } |
186
|
19 |
0 |
if ((eval {
do {
require MIME::Base32::XS;
1
}
} || 0) ne 1) { } |
189
|
0 |
19 |
if $self->{'DEBUG'} |
194
|
0 |
0 |
if $self->{'DEBUG'} |
202
|
0 |
0 |
if ((eval {
do {
require MIME::Base32::XS;
1
}
} || 0) ne 1) { } |
205
|
0 |
0 |
if $self->{'DEBUG'} |
210
|
0 |
0 |
if $self->{'DEBUG'} |
222
|
1 |
0 |
if (length $secret > 13) |
223
|
0 |
1 |
if $self->{'DEBUG'} |
234
|
0 |
0 |
unless ($user) |
243
|
0 |
0 |
if ($issuer) { } |
263
|
0 |
18 |
unless ($otp and $otp =~ /^\d{6,8}$/) |
282
|
0 |
18 |
if $self->{'DEBUG'} |
296
|
0 |
18 |
if $self->{'DEBUG'} |
298
|
18 |
0 |
if ($code eq sprintf('%0' . $self->{'digits'} . 'd', $otp)) |
312
|
0 |
1 |
if (@_ != 0) |
313
|
0 |
0 |
if (ref $_[0] eq 'HASH') { } |
|
0 |
0 |
elsif (not scalar(@_) % 2) { } |