Branch Coverage

blib/lib/Crypt/Misc.pm
Criterion Covered Total %
branch 37 86 43.0


line true false branch
43 0 290 if not defined $bytes or length $bytes == 0
47 80 210 if ($bytes =~ /^(\x00+)/)
52 290 0 if (defined $alphabet)
54 0 290 unless $alphabet =~ /^[a-zA-Z0-9]{58}$/
56 0 290 if $@
65 0 291 if not defined $base58 or length $base58 == 0
68 291 0 if (defined $alphabet)
69 1 290 unless $alphabet =~ /^[a-zA-Z0-9]{58}$/ and $base58 =~ /^[$alphabet]+$/
71 0 290 if $@
73 0 290 unless $base58 =~ /^[$default]+$/
77 80 210 if ($base58 =~ /^(0+)(.*)$/)
81 265 25 if defined $base58 and length $base58 > 0
105 2 9 unless $content
106 0 11 unless $content
115 0 11 unless $b64
118 0 11 unless $binary
123 0 0 if $k eq "Proc-Type"
124 0 0 if $k eq "DEK-Info"
126 0 0 if ($cipher_name and $iv_hex and $ptype and $ptype eq "4,ENCRYPTED")
127 0 0 unless defined $password
141 0 21 if ($password)
151 0 21 if (@headers)
164 0 278 unless -f $f
165 0 278 unless open my $fh, "<", $f
172 0 1 unless defined $_[1]
173 0 1 unless open my $fh, ">", $_[0]
175 0 1 unless print $fh $_[1]
176 0 1 unless close $fh
182 0 1 unless defined $a and defined $b
224 0 2 unless $uuid
225 1 1 if $uuid =~ /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i
231 1 7 unless $uuid
232 5 2 if $uuid =~ /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
243 0 0 unless $cipher and $mode
245 0 0 if $cipher eq "DES_EDE"
246 0 0 if $cipher eq "DES"
247 0 0 if $cipher eq "SEED"
248 0 0 $klen ? :
250 0 0 unless $klen and $ilen
252 0 0 if $mode eq "CBC"
253 0 0 if $mode eq "CFB"
254 0 0 if $mode eq "ECB"
255 0 0 if $mode eq "OFB"