Crypt::Lite - Easy to use symmetric data encryption and decryption
$crypt = Crypt::Lite->new( debug => 0 );
$crypt = Crypt::Lite->new( debug => 0, encoding => 'hex8' );
$encrypted = $crypt->encrypt('plain text to encrypt', 'your_secret_string');
$decrypted = $crypt->decrypt($encrypted, 'your_secret_string');
Returns an empty string if the encrypted hash has been broken
Crypt::Lite does NOT strong encryption - that's what the "Lite" stands for. It's very easy to install and use, anwhere where Perl runs. Please take a closer look on AES or Blowfish for strong encryption.
Crypt::Lite returns an empty string if the passphrase does not exactly match. Especially block ciphers often return a partial plain text even if, let's say about 90 % of the passphrase was correct (this will not say it's more secure - it's a property ;-).
Sometimes it's necessary to protect some certain data against plain reading or you intend to send information through the Internet. Another reason might be to assure users cannot modify their previously entered data in a follow-up step of a long Web transaction where you don't want to deal with server-side session data. The goal of Crypt::Lite was to have a pretty simple way to encrypt and decrypt data without the need to install and compile huge packages with lots of dependencies.
Crypt::Lite has the property that it typically returns an empty string on a wrong passphrase instead of a partially decrpyted string. It generates every time a different encrypted hash when you re-encrypt the same data with the same secret string. In normal cases of XOR encryption, what Crypt::Lite is based on, double or tripple encryption does NOT increase the security. Because of the nature of Crypt::Lite I state (because of the shifting concept) double encryption *does* increase the challenge to decrypt it. Nevertheless I *don't* recommend it because at least it creates very large strings ;-) What I really suggest is to use good passphrases not shorter than 6 characters, or better 16 characters length to encrypt. A randomly generated passphrase that is used only once of the same length as the plain text will be the most secure encryption with Crypt::Lite.
In general, decryption works also on hashes that have been encrypted on a foreign host (try this with an unpatched IDEA installation ;-).
Since last time has grown a harshly thread about XOR encryption I suggest to take a look from time to time on this URL to get the latest news and documentation on
None by default.
Please find a documentation and related news about this module on
There is currently no mailing list.
Reto Schaer, <firstname.lastname@example.org>
Copyright (C) 2002-2006 by Reto Schaer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.
Feel free to use it for commercial purposes or just for pleasure. You may change the code for your needs if you like. Redistribution and use in source and binary forms, with or without modification, are permitted.
I ask you to leave the link to the related documentation anywhere at the the top of the module in case of redistribution my code.
To install Crypt::Lite, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.