line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: NULL.pm,v 1.02 2001/05/04 08:04:27 ams Exp $ |
2
|
|
|
|
|
|
|
# Copyright 2001 Abhijit Menon-Sen |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Crypt::NULL; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
16960
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
7
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
75
|
|
8
|
1
|
|
|
1
|
|
5
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
425
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
($VERSION) = q$Revision: 1.02 $ =~ /(\d+\.\d+)/; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub keysize () { 16 } |
13
|
|
|
|
|
|
|
sub blocksize () { 16 } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new |
16
|
|
|
|
|
|
|
{ |
17
|
40003
|
|
|
40003
|
1
|
178786
|
my ($class, $key) = @_; |
18
|
|
|
|
|
|
|
|
19
|
40003
|
50
|
|
|
|
97370
|
croak "Usage: ".__PACKAGE__."->new(\$key)" unless $key; |
20
|
40003
|
|
|
|
|
114171
|
return bless {}, $class; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub encrypt |
24
|
|
|
|
|
|
|
{ |
25
|
70001
|
|
|
70001
|
1
|
380694
|
my ($self, $data) = @_; |
26
|
|
|
|
|
|
|
|
27
|
70001
|
50
|
33
|
|
|
562241
|
croak "Usage: \$cipher->encrypt(\$data)" unless ref($self) && $data; |
28
|
70001
|
|
|
|
|
233221
|
return $data; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub decrypt |
32
|
|
|
|
|
|
|
{ |
33
|
70001
|
|
|
70001
|
1
|
412534
|
my ($self, $data) = @_; |
34
|
|
|
|
|
|
|
|
35
|
70001
|
50
|
33
|
|
|
498814
|
croak "Usage: \$cipher->decrypt(\$data)" unless ref($self) && $data; |
36
|
70001
|
|
|
|
|
234903
|
return $data; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |