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 } }) { }
7 0 elsif (eval { do { require Net::SSLeay } }) { }
0 0 elsif (eval { do { require Crypt::Random } }) { }
0 0 elsif (eval { do { require Bytes::Random::Secure } }) { }
25 0 0 if (Crypt::OpenSSL::Random::random_status())
30 7 0 if (Net::SSLeay::RAND_status() == 1)
31 0 7 if (Net::SSLeay::RAND_bytes($rv, $length) != 1)
43 0 7 unless (defined $rv)
51 0 2 unless @_ == 2 or @_ == 6
57 0 3 unless @_ == 2 or @_ == 6
59 0 3 unless defined $key
64 0 5 unless @_ == 2 or @_ == 6
66 0 5 unless defined $key
72 0 9 unless defined $key and defined $salt and defined $N and defined $r and defined $p
78 0 1 unless $string
79 0 1 unless defined $passwd
81 0 1 unless defined $salt and defined $hash
84 0 1 unless defined $salt and defined $hash
85 0 1 unless length $hash > 0
86 0 1 unless $N > 0 and $r >= 0 and $p >= 0
89 0 1 unless defined $key
90 0 1 unless _slow_eq($key, $hash)
102 2 17 if (@_ == 1) { }
8 9 elsif (@_ == 2) { }
1 8 elsif (@_ == 5) { }
8 0 elsif (@_ == 6) { }
120 0 19 if ($N <= 0 or ($N & $N - 1) != 0)
121 0 19 if ($args[1] < 1)
122 0 19 if ($args[2] < 1)
123 0 19 if ($args[3] < 1)
125 4 15 if ref $salt eq "SCALAR" and $$salt =~ /^\d+$/
127 9 10 wantarray ? :
132 5 14 unless defined $a and defined $b