line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::ASN1::BitString; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
149352
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
52
|
|
4
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
37
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
368
|
use Crypt::Perl::X (); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
348
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub encode { |
9
|
23
|
|
|
23
|
0
|
4869
|
my ($field_ar, $flags_ar) = @_; |
10
|
|
|
|
|
|
|
|
11
|
23
|
|
|
|
|
40
|
my @unknown; |
12
|
23
|
|
|
|
|
95
|
for my $fl ( @$flags_ar ) { |
13
|
70
|
100
|
|
|
|
111
|
push @unknown, $fl if !grep { $_ eq $fl } @$field_ar; |
|
646
|
|
|
|
|
945
|
|
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
23
|
100
|
|
|
|
81
|
if (@unknown) { |
17
|
1
|
|
|
|
|
7
|
die Crypt::Perl::X::create('Generic', "Unknown flag(s): [@unknown] (Accepted values: [@$field_ar])"); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
22
|
|
|
|
|
61
|
my $str = q<>; |
21
|
|
|
|
|
|
|
|
22
|
22
|
|
|
|
|
82
|
for my $f ( 0 .. $#$field_ar ) { |
23
|
202
|
100
|
|
|
|
252
|
$str .= (grep { $_ eq $field_ar->[$f] } @$flags_ar) ? 1 : 0; |
|
586
|
|
|
|
|
908
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
22
|
|
|
|
|
164
|
return pack 'B*', $str; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |