line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PAB3::Crypt::XOR; |
2
|
|
|
|
|
|
|
# ============================================================================= |
3
|
|
|
|
|
|
|
# Perl Application Builder |
4
|
|
|
|
|
|
|
# Module: PAB3::Crypt::Xor |
5
|
|
|
|
|
|
|
# Use "perldoc PAB3::Crypt::Xor" for documentation |
6
|
|
|
|
|
|
|
# ============================================================================= |
7
|
1
|
|
|
1
|
|
722
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
8
|
1
|
|
|
1
|
|
4
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
4
|
use vars qw($VERSION @EXPORT_FNC); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
143
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
BEGIN { |
13
|
1
|
|
|
1
|
|
2
|
$VERSION = '1.01'; |
14
|
1
|
|
|
|
|
6
|
require XSLoader; |
15
|
1
|
|
|
|
|
576
|
XSLoader::load( __PACKAGE__, $VERSION ); |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
|
|
7
|
*encrypt = \&xs_aperiodic; |
18
|
1
|
|
|
|
|
2
|
*decrypt = \&xs_aperiodic; |
19
|
1
|
|
|
|
|
164
|
@EXPORT_FNC = qw(encrypt decrypt decrypt_hex encrypt_hex); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub import { |
25
|
1
|
|
|
1
|
|
13
|
my $pkg = shift; |
26
|
1
|
|
|
|
|
2
|
my $callpkg = caller(); |
27
|
1
|
50
|
33
|
|
|
13
|
if( $_[0] and $pkg eq __PACKAGE__ and $_[0] eq 'import' ) { |
|
|
|
33
|
|
|
|
|
28
|
0
|
|
|
|
|
0
|
*{$callpkg . '::import'} = \&import; |
|
0
|
|
|
|
|
0
|
|
29
|
0
|
|
|
|
|
0
|
return; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
# export symbols |
32
|
1
|
|
|
|
|
2
|
foreach( @_ ) { |
33
|
1
|
50
|
|
|
|
5
|
if( $_ eq ':default' ) { |
34
|
1
|
|
|
|
|
2
|
*{$callpkg . '::xor_' . $_} = \&{$pkg . '::' . $_} foreach @EXPORT_FNC; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
9
|
|
35
|
1
|
|
|
|
|
3
|
last; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |