line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::ASN1::Encodee; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
2036
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
128
|
|
4
|
5
|
|
|
5
|
|
22
|
use warnings; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
101
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
1080
|
use Crypt::Perl::ASN1 (); |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
98
|
|
7
|
5
|
|
|
5
|
|
29
|
use Crypt::Perl::X (); |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
779
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub asn1_macro { |
10
|
467
|
|
|
467
|
0
|
970
|
my ($self_or_class) = @_; |
11
|
|
|
|
|
|
|
|
12
|
467
|
|
33
|
|
|
1217
|
my $class = ref($self_or_class) || $self_or_class; |
13
|
|
|
|
|
|
|
|
14
|
467
|
50
|
|
|
|
2738
|
$class =~ m<.+::(.+)> or die Crypt::Perl::X::create('Generic', "Invalid class: “$class”"); |
15
|
|
|
|
|
|
|
|
16
|
467
|
|
|
|
|
1813
|
return $1; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub encode { |
20
|
499
|
|
|
499
|
0
|
1925
|
my ($self) = @_; |
21
|
|
|
|
|
|
|
|
22
|
499
|
|
|
|
|
1545
|
my $asn1 = Crypt::Perl::ASN1->new(); |
23
|
499
|
|
|
|
|
23509
|
$asn1 = $asn1->prepare( $self->ASN1() )->find( $self->asn1_macro() ); |
24
|
|
|
|
|
|
|
|
25
|
499
|
|
|
|
|
9166
|
return $asn1->encode( $self->_encode_params() ); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |