Branch Coverage

blib/lib/Crypt/ScryptKDF.pm
Criterion Covered Total %
branch 37 68 54.4


line true false branch
21 0 7 if (eval { do { require Crypt::PRNG } }) { }
0 7 elsif (eval { do { require Crypt::OpenSSL::Random } }) { }
0 7 elsif (eval { do { require Net::SSLeay } }) { }
0 7 elsif (eval { do { require Crypt::Random } }) { }
0 7 elsif (eval { do { require Bytes::Random::Secure } }) { }
25 0 0 if (Crypt::OpenSSL::Random::random_status())
30 0 0 if (Net::SSLeay::RAND_status() == 1)
31 0 0 if (Net::SSLeay::RAND_bytes($rv, $length) != 1)
43 7 0 unless (defined $rv)
52 0 2 unless @_ == 2 or @_ == 6
58 0 3 unless @_ == 2 or @_ == 6
60 0 3 unless defined $key
65 0 5 unless @_ == 2 or @_ == 6
67 0 5 unless defined $key
73 0 9 unless defined $key and defined $salt and defined $N and defined $r and defined $p
79 0 1 unless $string
80 0 1 unless defined $passwd
82 0 1 unless defined $salt and defined $hash
85 0 1 unless defined $salt and defined $hash
86 0 1 unless length $hash > 0
87 0 1 unless $N > 0 and $r >= 0 and $p >= 0
90 0 1 unless defined $key
91 0 1 unless _slow_eq($key, $hash)
103 2 17 if (@_ == 1) { }
8 9 elsif (@_ == 2) { }
1 8 elsif (@_ == 5) { }
8 0 elsif (@_ == 6) { }
121 0 19 if ($N <= 0 or ($N & $N - 1) != 0)
122 0 19 if ($args[1] < 1)
123 0 19 if ($args[2] < 1)
124 0 19 if ($args[3] < 1)
126 4 15 if ref $salt eq 'SCALAR' and $$salt =~ /^\d+$/
128 9 10 wantarray ? :
133 5 14 unless defined $a and defined $b