line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- perl -*- |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Copyright (c) 2007 by Jeff Weisberg |
4
|
|
|
|
|
|
|
# Author: Jeff Weisberg |
5
|
|
|
|
|
|
|
# Created: 2007-Feb-04 16:35 (EST) |
6
|
|
|
|
|
|
|
# Function: DER |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# $Id: DER.pm,v 1.5 2007/03/06 02:50:10 jaw Exp $ |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
package Encoding::BER::DER; |
11
|
1
|
|
|
1
|
|
2268
|
use Encoding::BER; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
12
|
1
|
|
|
1
|
|
5
|
use vars qw($VERSION @ISA); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
60
|
|
13
|
|
|
|
|
|
|
$VERSION = '1.00'; |
14
|
|
|
|
|
|
|
@ISA = qw(Encoding::BER); |
15
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
62
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
23
|
|
|
23
|
1
|
368
|
my $cl = shift; |
19
|
|
|
|
|
|
|
|
20
|
23
|
|
|
|
|
103
|
$cl->SUPER::new( @_, flavor => 'DER' ); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 NAME |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Encoding::BER::DER - Perl module for encoding/decoding data using ASN.1 Distinguished Encoding Rules (DER) |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 SYNOPSIS |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
use Encoding::BER::DER; |
30
|
|
|
|
|
|
|
my $enc = Encoding::BER::DER->new(); |
31
|
|
|
|
|
|
|
my $der = $enc->encode( $data ); |
32
|
|
|
|
|
|
|
my $xyz = $enc->decode( $der ); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 BUGS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Items with a length larger than can fit in 32 bits, will be encoded using |
37
|
|
|
|
|
|
|
the indefinite form. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SEE ALSO |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Encoding::BER, Encoding::BER::CER |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 AUTHOR |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Jeff Weisberg - http://www.tcp4me.com/ |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
48
|
|
|
|
|
|
|
; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|