Branch Coverage

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


line true false branch
39 1 2 if ($$args{'symmetric_cipher'} or not %{$args;})
42 0 23 if ref $e
57 2 1 if ($$args{'digest'} or not %{$args;})
61 0 30 if (ref $e)
62 0 0 if warn qq[Loading "$module" failed: $e]
65 224 166 $_ ~~ qr/^sha|md5|md4|md2|ripemd|tiger|whirlpool.*/ ? :
74 2 1 if ($$args{'mac'} or not %{$args;})
78 0 12 if (ref $e)
79 0 0 if warn qq[Loading "$module" failed: $e]
82 8 160 $_ ~~ qr/^hmac.*/ ? :
92 0 19 unless $key
105 0 20 unless $key
118 0 0 $mode eq 'sha256' ? :
123 0 0 $mode eq 'prng' ? :
129 0 0 unless $mode ne 'base64'
130 0 0 unless $mode ne 'hex'
131 0 0 unless $mode ne 'alphanum'
159 2 43 if $called =~ /^sha|md5|md4|md2|ripemd|tiger|whirlpool.*/
161 4 39 if $called =~ /^hmac.*/