Branch Coverage

blib/lib/Crypt/KeyWrap.pm
Criterion Covered Total %
branch 103 146 70.5


line true false branch
29 12541 0 $len > $bytes ? :
35 12541 0 $len > $bytes ? :
40 10656 1872 if ($bytes == 8)
41 0 10656 if $Crypt::KeyWrap::Config{'uvsize'} == 4
44 1872 0 if $bytes == 4
49 68 70 unless defined $cipher
50 68 0 $cipher eq 'AES' ? :
68 70 unless defined $padding
54 0 138 unless defined $kek
55 0 138 unless defined $pt_data
57 0 91 unless $klen == 16 or $klen == 24 or $klen == 32
58 0 138 unless $cipher eq 'AES' or $cipher eq 'DES_EDE'
59 0 138 if $padding and $cipher eq 'DES_EDE'
62 10 128 $cipher eq 'DES_EDE' ? :
66 33 105 if ($len % $blck > 0)
67 0 33 unless $padding
75 13 125 if ($n == 1)
76 6 7 $inverse ? :
85 2178 3834 $inverse ? :
99 93 70 unless defined $cipher
100 93 0 $cipher eq 'AES' ? :
93 70 unless defined $padding
104 0 163 unless defined $kek
105 0 163 unless defined $ct_data
107 0 99 unless $klen == 16 or $klen == 24 or $klen == 32
108 0 163 unless $cipher eq 'AES' or $cipher eq 'DES_EDE'
109 0 163 if $padding and $cipher eq 'DES_EDE'
112 10 153 $cipher eq 'DES_EDE' ? :
117 13 150 if ($n == 1) { }
118 6 7 $inverse ? :
128 2178 4338 $inverse ? :
140 130 33 if ($A_hex eq 'a6' x $blck) { }
33 0 elsif ($A_hex =~ /^a65959a6/ and $blck == 8) { }
144 0 33 unless $padding
148 0 33 unless $tail eq '00' x $z
158 18 1 unless defined $cipher
159 18 1 unless defined $iv
176 25 0 if ($alg =~ /^PBES2-HS(256|384|512)\+A(128|192|256)KW$/)
190 40 0 if ($alg =~ /^PBES2-HS(256|384|512)\+A(128|192|256)KW$/)
207 0 21 unless ref $kek_public eq 'Crypt::PK::RSA'
209 7 14 if ($alg eq 'RSA-OAEP') { }
7 7 elsif ($alg eq 'RSA-OAEP-256') { }
7 0 elsif ($alg eq 'RSA1_5') { }
212 0 21 unless $padding
219 0 39 unless ref $kek_private eq 'Crypt::PK::RSA'
220 0 39 unless $kek_private->is_private
222 14 25 if ($alg eq 'RSA-OAEP') { }
10 15 elsif ($alg eq 'RSA-OAEP-256') { }
15 0 elsif ($alg eq 'RSA1_5') { }
225 0 39 unless $padding
235 68 0 unless defined $apu
236 68 0 unless defined $apv
239 38 30 if $key_size % $hsize > 0
254 0 7 unless ref $kek_public eq 'Crypt::PK::ECC'
256 3 4 if ($enc =~ /^A(128|192|256)CBC-HS/)
259 4 3 if ($enc =~ /^A(128|192|256)GCM/)
270 0 15 unless ref $kek_private eq 'Crypt::PK::ECC'
271 0 15 unless $kek_private->is_private
273 5 10 if ($enc =~ /^A(128|192|256)CBC-HS/)
276 10 5 if ($enc =~ /^A(128|192|256)GCM/)
279 8 7 ref $epk ? :
0 15 ref $epk eq 'Crypt::PK::ECC' ? :
287 0 20 unless ref($kek_public) =~ /^Crypt::PK::(ECC|X25519)$/
289 20 0 if ($alg =~ /^ECDH-ES\+A(128|192|256)KW$/)
293 19 1 if (ref $kek_public eq 'Crypt::PK::ECC') { }
306 0 26 unless ref($kek_private) =~ /^Crypt::PK::(ECC|X25519)$/
307 0 26 unless $kek_private->is_private
309 26 0 if ($alg =~ /^ECDH-ES\+A(128|192|256)KW$/)
313 25 1 if (ref $kek_private eq 'Crypt::PK::ECC') { }
314 6 19 ref $epk ? :
0 25 ref $epk eq 'Crypt::PK::ECC' ? :
317 0 1 ref $epk ? :
0 1 ref $epk eq 'Crypt::PK::X25519' ? :