Condition Coverage

blib/lib/Crypt/CBC.pm
Criterion Covered Total %
condition 32 97 33.0


and 3 conditions

line !l l&&!r l&&r condition
35 0 15 0 $$options{'cipher'} && ref $$options{'cipher'}
53 15 0 0 exists $$options{'prepend_iv'} and not $$options{'prepend_iv'}
54 15 0 0 exists $$options{'add_header'} and not $$options{'add_header'}
58 15 0 0 exists $$options{'salt'} and $header_mode ne 'salt'
91 15 0 0 exists $$options{'literal_key'} and exists $$options{'regenerate_key'}
95 15 0 0 exists $$options{'regenerate_key'} and not $$options{'regenerate_key'}
99 15 0 0 defined $salt and $salt ne '1'
100 15 0 0 defined $salt and length $salt != 8
15 0 0 defined $salt and length $salt != 8 and $salt ne '1'
105 15 0 0 defined $iv and length $iv != $bs
107 15 0 0 exists $$options{'regenerate_key'} && !$$options{'regenerate_key'}
111 0 15 0 $padding and ref $padding eq 'CODE'
140 15 0 0 defined $key and length $key != $ks
145 15 0 0 defined $iv and length $iv != $bs
321 0 0 435 $$self{'key'} and $$self{'civ'}
365 0 0 435 defined $$self{'key'} and defined $$self{'civ'}
419 0 0 435 -r '/dev/urandom' and open F, '/dev/urandom'

or 2 conditions

line l !l condition
44 0 0 $pass ||= ''
53 0 0 $header_mode ||= 'none'
54 0 0 $header_mode ||= 'none'
55 0 15 $header_mode ||= 'salt'
77 0 15 $ks ||= eval {
78 0 15 $bs ||= eval {
84 10 5 $ks ||= $cipherclass =~ /blowfish/i ? 56 : 8
85 15 0 $bs ||= $ks
109 12 3 $$options{'padding'} || 'standard'
255 870 0 $$self{'civ'} ||= ''
269 399 36 $$self{'padding'}($block, $bs, 'e') || ''

or 3 conditions

line l !l&&r !l&&!r condition
63 0 15 0 ref $cipher || $cipher
67 10 5 0 $cipher->can('encrypt') or eval "require $cipher; 1"
107 0 0 15 $$options{'literal_key'} || exists $$options{'regenerate_key'} && !$$options{'regenerate_key'}
133 0 0 0 $bs == 8 or $legacy_hack
293 0 0 0 $$self{'key'} ||= $self->_key_from_key($$self{'passphrase'})
309 0 0 0 $self->blocksize == 8 or $self->legacy_hack
342 0 0 0 $$self{'key'} ||= $self->_key_from_key($$self{'passphrase'})
358 0 0 0 $$self{'key'} ||= $self->_key_from_key($$self{'passphrase'})