Branch Coverage

blib/lib/Mojolicious/Plugin/Crypto.pm
Criterion Covered Total %
branch 19 38 50.0


line true false branch
38 1 2 if ($$args{'symmetric_cipher'} or not %{$args;})
41 0 23 if ref $e
56 2 1 if ($$args{'digest'} or not %{$args;})
60 0 30 if (ref $e)
61 0 0 if warn qq[Loading "$module" failed: $e]
64 224 166 $_ ~~ qr/^sha|md5|md4|md2|ripemd|tiger|whirlpool.*/ ? :
73 2 1 if ($$args{'mac'} or not %{$args;})
77 0 12 if (ref $e)
78 0 0 if warn qq[Loading "$module" failed: $e]
81 8 160 $_ ~~ qr/^hmac.*/ ? :
91 0 19 unless $key
104 0 20 unless $key
117 0 0 $mode eq 'sha256' ? :
122 0 0 $mode eq 'prng' ? :
128 0 0 unless $mode ne 'base64'
129 0 0 unless $mode ne 'hex'
130 0 0 unless $mode ne 'alphanum'
158 2 43 if $called =~ /^sha|md5|md4|md2|ripemd|tiger|whirlpool.*/
160 4 39 if $called =~ /^hmac.*/