line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::ASN1::BitString; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
170678
|
use strict; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
63
|
|
4
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
65
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
423
|
use Crypt::Perl::X (); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
420
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub encode { |
9
|
23
|
|
|
23
|
0
|
5940
|
my ($field_ar, $flags_ar) = @_; |
10
|
|
|
|
|
|
|
|
11
|
23
|
|
|
|
|
55
|
my @unknown; |
12
|
23
|
|
|
|
|
102
|
for my $fl ( @$flags_ar ) { |
13
|
70
|
100
|
|
|
|
119
|
push @unknown, $fl if !grep { $_ eq $fl } @$field_ar; |
|
646
|
|
|
|
|
983
|
|
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
23
|
100
|
|
|
|
82
|
if (@unknown) { |
17
|
1
|
|
|
|
|
9
|
die Crypt::Perl::X::create('Generic', "Unknown flag(s): [@unknown] (Accepted values: [@$field_ar])"); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
22
|
|
|
|
|
67
|
my $str = q<>; |
21
|
|
|
|
|
|
|
|
22
|
22
|
|
|
|
|
83
|
for my $f ( 0 .. $#$field_ar ) { |
23
|
202
|
100
|
|
|
|
272
|
$str .= (grep { $_ eq $field_ar->[$f] } @$flags_ar) ? 1 : 0; |
|
586
|
|
|
|
|
980
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
22
|
|
|
|
|
138
|
return pack 'B*', $str; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |