Condition Coverage

lib/Crypt/CBC.pm
Criterion Covered Total %
condition 76 121 62.8


and 3 conditions

line !l l&&!r l&&r condition
60 38 9 2 defined $iv and length $iv != $bs
68 42 3 2 defined $key and length $key != $ks
82 0 0 3 defined $key && defined $iv
41 3 0 $pbkdf eq "none" and not defined $key && defined $iv
85 41 2 1 $header_mode eq "randomiv" and $pbkdf ne "randomiv"
201 59 3274 0 $self->_needs_padding and $self->{'padding'} eq \&Crypt::CBC::_no_padding
3333 0 0 $self->_needs_padding and $self->{'padding'} eq \&Crypt::CBC::_no_padding and length($data) % $bs
206 59 3274 0 $self->_needs_padding and $self->{'padding'} eq \&Crypt::CBC::_rijndael_compat
3333 0 0 $self->_needs_padding and $self->{'padding'} eq \&Crypt::CBC::_rijndael_compat and length($data) % $bs
238 3161 172 0 length $block == 0 and $self->{'padding'} eq \&Crypt::CBC::_rijndael_compat
254 1627 37 3 length $block == 0 and not $self->_needs_padding
323 52 0 0 exists $options->{'prepend_iv'} and not $options->{'prepend_iv'}
324 52 0 0 exists $options->{'add_header'} and not $options->{'add_header'}
325 16 29 5 exists $options->{'pbkdf'} and $options->{'pbkdf'} eq "none"
338 0 49 0 $padding and ref $padding eq "CODE"
380 0 49 2 $options->{'cipher'} && ref $options->{'cipher'}
393 48 2 0 exists $options->{'literal_key'} and exists $options->{'regenerate_key'}
396 50 0 0 exists $options->{'regenerate_key'} and not $options->{'regenerate_key'}
400 42 1 7 defined $salt and $salt ne 1
401 42 6 2 defined $salt and length $salt != 8
48 1 1 defined $salt and length $salt != 8 and $salt ne 1
427 0 0 49 $iter =~ /[\d_]+/ and $iter >= 1
428 0 0 49 $iter =~ /[\d_]+/ and $iter >= 1
685 0 0 1666 $self->{'key'} and $self->{'civ'}
713 0 0 1667 defined $self->{'key'} and defined $self->{'civ'}
753 0 0 0 ref $alg and $alg->can("digest")

or 2 conditions

line l !l condition
244 3333 0 $self->{'civ'} ||= ""
323 0 0 $header_mode ||= "none"
324 0 0 $header_mode ||= "none"
325 6 1 $header_mode ||= "none"
326 22 30 $header_mode ||= "salt"
336 18 31 $options->{'padding'} || 'standard'
384 0 2 $pass ||= ""
426 1 48 $options->{'iter'} || 10000

or 3 conditions

line l !l&&r !l&&!r condition
56 2 5 0 $key ||= $pass
298 50 0 0 $cipher->can("encrypt") or eval "require $cipher; 1"
325 2 16 34 $options->{'literal_key'} or exists $options->{'pbkdf'} and $options->{'pbkdf'} eq "none"
363 41 10 0 $options->{'keysize'} || eval {
378 10 38 3 $options->{'pass'} || $options->{'key'}
407 2 0 47 $options->{'literal_key'} || exists $options->{'regenerate_key'} && !$options->{'regenerate_key'}
422 34 15 0 $options->{'pbkdf'} || ($options->{'literal_key'} ? 'none' : ($header_mode eq 'randomiv' ? 'randomiv' : 'opensslv1'))
623 3 0 1671 $self->pbkdf eq "none" or $self->{'literal_key'}
645 3 1 0 $self->{'salt'} ||= $self->_get_random_bytes(8)