#
# Copyright (C) 1995, 1996 Systemics Ltd (http://www.systemics.com/)
# All rights reserved.
#

=head1 NAME

Crypt::Blowfish - Perl Blowfish encryption module

=head1 SYNOPSIS

    use Crypt::Blowfish;
    

=head1 DESCRIPTION

The module implements the Crypt::BlockCipher interface,
which has the following methods

=over 4

=item blocksize
=item keysize
=item encrypt
=item decrypt

=back

=head1 FUNCTIONS

=over 4

=item blocksize

Returns the size (in bytes) of the block cipher.

=item keysize

Returns the size (in bytes) of the key.

=item new

	my $cipher = new Crypt::Blowfish $key;

This creates a new Crypt::Blowfish BlockCipher object, using $key,
where $key is a key of C<keysize()> bytes.

=item encrypt

	my $cipher = new Crypt::Blowfish $key;
	my $ciphertext = $cipher->encrypt($plaintext);

This function encrypts $plaintext and returns the $ciphertext
where $plaintext and $ciphertext should be of C<blocksize()> bytes.

=item decrypt

	my $cipher = new Crypt::Blowfish $key;
	my $plaintext = $cipher->decrypt($ciphertext);

This function decrypts $ciphertext and returns the $plaintext
where $plaintext and $ciphertext should be of C<blocksize()> bytes.

=back

=head1 EXAMPLE

	my $key = pack("H16", "0123456789ABCDEF");
	my $cipher = new Crypt::Blowfish $key;
	my $ciphertext = $cipher->encrypt("plaintex");	# NB - 8 bytes
	print unpack("H16", $ciphertext), "\n";

=head1 NOTES

This perl module requires that the Crypt::Blowfish perl extension is installed.

=head1 SEE ALSO

Crypt::DES
Crypt::IDEA

Bruce Schneier, I<Applied Cryptography>, 1995, Second Edition,
published by John Wiley & Sons, Inc.

=head1 COPYRIGHT

The implementation of the Blowfish algorithm was developed by,
and is copyright of, A.M. Kuchling.
Other parts of the perl extension and module are
copyright of Systemics Ltd ( http://www.systemics.com/ ).
