Condition Coverage

blib/lib/File/KDBX/Cipher/Stream.pm
Criterion Covered Total %
condition 7 19 36.8


and 3 conditions

line !l l&&!r l&&r condition
31 0 1 0 $uuid eq "\326\3\212+\213oL\265\245\$3\2321\333\265\232" and length $args{'iv'} == 16

or 2 conditions

line l !l condition
20 91 107 $_[0]{'offset'} //= undef
22 0 0 $_[0]{'algorithm'} or ""
0 0 {"Salsa20", 32, "ChaCha", 32}->{$_[0]{'algorithm'} or ""} // 0
23 0 0 $_[0]{'algorithm'} or ""
0 0 {"Salsa20", 8, "ChaCha", 12}->{$_[0]{'algorithm'} or ""} // -1

or 3 conditions

line l !l&&r !l&&!r condition
19 91 0 107 $_[0]{'counter'} //= $default
80 31 198 0 $self->{'stream'} //= do { my $s = eval { do { my $pkg = "Crypt::Stream::" . $self->algorithm; my $counter = $self->counter; my $pos = 0; if (defined(my $offset = $self->offset)) { $counter = int $offset / 64; $pos = $offset % 64; } ; &load($pkg); my $s = $pkg->new($self->key, $self->iv, $counter); $s->keystream($pos) if $pos; $s } }; if (my $err = $@) { throw("Failed to initialize stream cipher library", "error", $err, "algorithm", $self->{'algorithm'}, "key_length", length $self->key, "iv_length", length $self->iv, "iv", unpack("H*", $self->iv), "key", unpack("H*", $self->key)); } ; $s }