line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::ASN1::BitString; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1145
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
66
|
|
4
|
2
|
|
|
2
|
|
22
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
46
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
9
|
use Crypt::Perl::X (); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
463
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub encode { |
9
|
23
|
|
|
23
|
0
|
5984
|
my ($field_ar, $flags_ar) = @_; |
10
|
|
|
|
|
|
|
|
11
|
23
|
|
|
|
|
45
|
my @unknown; |
12
|
23
|
|
|
|
|
63
|
for my $fl ( @$flags_ar ) { |
13
|
70
|
100
|
|
|
|
163
|
push @unknown, $fl if !grep { $_ eq $fl } @$field_ar; |
|
646
|
|
|
|
|
1107
|
|
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
23
|
100
|
|
|
|
118
|
if (@unknown) { |
17
|
1
|
|
|
|
|
13
|
die Crypt::Perl::X::create('Generic', "Unknown flag(s): [@unknown] (Accepted values: [@$field_ar])"); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
22
|
|
|
|
|
96
|
my $str = q<>; |
21
|
|
|
|
|
|
|
|
22
|
22
|
|
|
|
|
108
|
for my $f ( 0 .. $#$field_ar ) { |
23
|
202
|
100
|
|
|
|
322
|
$str .= (grep { $_ eq $field_ar->[$f] } @$flags_ar) ? 1 : 0; |
|
586
|
|
|
|
|
1172
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
22
|
|
|
|
|
164
|
return pack 'B*', $str; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |