line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::ASN1::BitString; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
132947
|
use strict; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
44
|
|
4
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
40
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
321
|
use Crypt::Perl::X (); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
295
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub encode { |
9
|
23
|
|
|
23
|
0
|
4373
|
my ($field_ar, $flags_ar) = @_; |
10
|
|
|
|
|
|
|
|
11
|
23
|
|
|
|
|
38
|
my @unknown; |
12
|
23
|
|
|
|
|
74
|
for my $fl ( @$flags_ar ) { |
13
|
70
|
100
|
|
|
|
101
|
push @unknown, $fl if !grep { $_ eq $fl } @$field_ar; |
|
646
|
|
|
|
|
860
|
|
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
23
|
100
|
|
|
|
66
|
if (@unknown) { |
17
|
1
|
|
|
|
|
8
|
die Crypt::Perl::X::create('Generic', "Unknown flag(s): [@unknown] (Accepted values: [@$field_ar])"); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
22
|
|
|
|
|
40
|
my $str = q<>; |
21
|
|
|
|
|
|
|
|
22
|
22
|
|
|
|
|
91
|
for my $f ( 0 .. $#$field_ar ) { |
23
|
202
|
100
|
|
|
|
223
|
$str .= (grep { $_ eq $field_ar->[$f] } @$flags_ar) ? 1 : 0; |
|
586
|
|
|
|
|
799
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
22
|
|
|
|
|
118
|
return pack 'B*', $str; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |