Branch Coverage

blib/lib/CAM/PDF/Decrypt.pm
Criterion Covered Total %
branch 40 66 60.6


line true false branch
74 0 38 unless ($doc)
80 0 38 unless (exists $$doc{'trailer'})
90 10 28 unless (exists $$doc{'trailer'}{'Encrypt'})
97 0 28 unless ($$doc{'ID'})
114 28 0 if ($$doc{'trailer'}{'Encrypt'}{'type'} eq 'reference')
123 0 28 if ($$dict{'Filter'}{'value'} ne 'Standard' or $$dict{'V'}{'value'} != 1 and $$dict{'V'}{'value'} != 2)
132 0 0 $$dict{'Length'} ? :
28 0 $$dict{'V'}{'value'} == 1 ? :
133 0 28 if (40 > $$self{'keylength'} or 128 < $$self{'keylength'} or 0 != $$self{'keylength'} % 8)
142 112 0 if (exists $$dict{$key}) { }
158 16 12 if ($self->_check_opass($opassword, $upassword)) { }
0 12 elsif ($self->_check_upass($$doc{'ID'}, $upassword)) { }
0 12 elsif ($prompt) { }
231 16 32 $allow{$key} ? :
241 12 0 if ('1' eq substr($binary, 0, 1)) { }
299 8 4 if ($objnum) { }
308 0 12 unless ($$doc{'trailer'})
316 0 12 unless ($$doc{'ID'})
383 433 85 if $$self{'noop'}
385 0 85 if (ref $content or ref $objnum or ref $gennum)
391 8 69 if $objnum and $$self{'EncryptBlock'} and $objnum == $$self{'EncryptBlock'}
393 8 69 unless (defined $gennum)
395 8 0 unless ($objnum)
414 44 25 unless (exists $$self{'keycache'}{$id})
426 0 44 if ($size > 16)
446 0 40 if (1 == substr($bytes, 0, 1))
456 0 40 if ($$self{'R'} == 3)
464 0 40 if ($$self{'R'} == 3)
485 0 24 if ($$self{'R'} == 3) { }
508 0 40 if ($$self{'R'} == 3)
525 0 40 if ($$self{'R'} == 3) { }
527 0 0 if ($backward)
578 12 108 unless (defined $pass)