line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::ASN1::BitString; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
172185
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
58
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
43
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
393
|
use Crypt::Perl::X (); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
349
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub encode { |
9
|
23
|
|
|
23
|
0
|
6018
|
my ($field_ar, $flags_ar) = @_; |
10
|
|
|
|
|
|
|
|
11
|
23
|
|
|
|
|
55
|
my @unknown; |
12
|
23
|
|
|
|
|
83
|
for my $fl ( @$flags_ar ) { |
13
|
70
|
100
|
|
|
|
125
|
push @unknown, $fl if !grep { $_ eq $fl } @$field_ar; |
|
646
|
|
|
|
|
1100
|
|
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
23
|
100
|
|
|
|
80
|
if (@unknown) { |
17
|
1
|
|
|
|
|
9
|
die Crypt::Perl::X::create('Generic', "Unknown flag(s): [@unknown] (Accepted values: [@$field_ar])"); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
22
|
|
|
|
|
75
|
my $str = q<>; |
21
|
|
|
|
|
|
|
|
22
|
22
|
|
|
|
|
104
|
for my $f ( 0 .. $#$field_ar ) { |
23
|
202
|
100
|
|
|
|
297
|
$str .= (grep { $_ eq $field_ar->[$f] } @$flags_ar) ? 1 : 0; |
|
586
|
|
|
|
|
1175
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
22
|
|
|
|
|
194
|
return pack 'B*', $str; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |