NAME
Crypt::Blowfish - Blowfish encryption algorithm
SYNOPSIS
use Crypt::Blowfish
$blowfish=new Crypt::Blowfish($key);
$ciphertextBlock=$blowfish->encrypt($plaintextBlock);
$plaintextBlock=$blowfish->decrypt($ciphertextBlock);
DESCRIPTION
The Crypt::Blowfish module provides for users to use the Blowfish encryption algorithm in perl. The implementation is entirely Object Oriented, as there is quite a lot of context inherent in making blowfish as fast as it is. The key is anywhere between 64 and 144 bits, and should be passed as a packed string. The transformation itself is a 16-round Feistel Network, and operates on a 64 bit block.
Object methods for the Crypt::Blowfish module:
new(key)
The new() method initialises a blowfish object with the key that is passed. This is the slow part of doing a blowfish encryption or decryption, as it initialises the 18 p-boxes and the 1024 s-boxes that are used for the algorithm. It will return undef if the key is not of a valid length.
encrypt(block)
The encrypt() method uses the initialised blowfish object to encrypt 8 bytes of data of the string passed to it. It returns the encrypted block.
decrypt(block)
The decrypt() method uses the initialised blowfish object to decrypt 8 bytes of data of the string passed to it. It returns the decrypted block.
COMMENTS
This is probably crap software, but hey, its for general use. I'm happy to patch it with other people's code... :)
AUTHOR
Matthew Byng-Maddick <matthew@codix.net
>
SEE ALSO
http://www.counterpane.com/,Crypt::CBC