NAME
Module::CryptSource - Encrypt and Decrypt source for Binary Packagers
SYNOPSIS
In myprog.pl:
use Module::CryptSource;
Afterwards:
% perl myprog.pl --ensrc
% perlapp -f myprog.pl # or perl2exe
% myprog.exe --desrc
DESCRIPTION
One of the problems in binary packages such as perlapp or perl2exe is the difficulty of uncovering the source code. While it can be argued that obscuring source code may be necessary in some environments, it could be disastrous when you accidentally lose the source code.
This self-modifying module let you specify a key to encrypted source code and modules, so you can use that key to retrieve them back.
To use this module, simply put use Module::CryptSource;
in all scripts and modules you wish to encrypt. Run it once with the --ensrc
option before running perlapp or perl2exe, so it can store the modified Module/CryptSource.pm along with your .exe file; copies of encrypted source files will be stored in the Module/CryptSource.pm file.
Run the resulting executable with --desrc
to decrypt the source files back.
CAVEATS
Storable, Crypt::Rijndael and Term::ReadKey are three XS modules you'll have to install it yourself. It's probably possible to use Crypt::Rijndael_PP and Win32::*
as alternatives, but I don't have the motivation to investigate yet.
If user enters a wrong decryption key, chances are that the unpack('N/a*')
will report an Out of memory!
error.
AUTHORS
Autrijus Tang <autrijus@autrijus.org>
COPYRIGHT
Copyright 2001, 2002 by Autrijus Tang <autrijus@autrijus.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.