Branch Coverage

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


line true false branch
40 1 2 if ($$args{'symmetric_cipher'} or not %{$args;})
43 0 23 if ref $e
58 2 1 if ($$args{'digest'} or not %{$args;})
62 0 30 if (ref $e)
63 0 0 if warn qq[Loading "$module" failed: $e]
66 224 166 $_ ~~ qr/^sha|md5|md4|md2|ripemd|tiger|whirlpool.*/ ? :
75 2 1 if ($$args{'mac'} or not %{$args;})
79 0 12 if (ref $e)
80 0 0 if warn qq[Loading "$module" failed: $e]
83 8 160 $_ ~~ qr/^hmac.*/ ? :
93 0 19 unless $key
106 0 20 unless $key
119 0 0 $mode eq 'sha256' ? :
124 0 0 $mode eq 'prng' ? :
130 0 0 unless $mode ne 'base64'
131 0 0 unless $mode ne 'hex'
132 0 0 unless $mode ne 'alphanum'
160 2 43 if $called =~ /^sha|md5|md4|md2|ripemd|tiger|whirlpool.*/
162 4 39 if $called =~ /^hmac.*/