Thanks for the replies and the advice. After looking into this I have gone with the following implemenation:
Crypt::CBC using 'Blowfish'
I have two small scripts based on the Crypt::CBC module page from cpan.org, but I am unable to get them to work correctly. The test file encrypts, but then when I go to decrypt the encrypted file, it does not decrypt.
==============================================================
enc.pl
#!/usr/bin/perl -w
use Crypt::CBC;
use FileHandle;
use strict;
open(CT,">ct.dat");
open(PT,"<pt.txt");
my $cipher = new Crypt::CBC({'key' => 't1234',
'cipher' => 'Blowfish',
'padding' => 'space'});
undef $/;
print CT $cipher->encrypt(<PT>);
close(CT);
close(PT);
exit(0)
# EOS
============================================================
============================================================
dec.pl
#!/usr/bin/perl -w
use Crypt::CBC;
use FileHandle;
use strict;
open(CT,"<ct.dat");
open(PT,">pt.dat");
my $cipher = new Crypt::CBC({'key' => 't1234',
'cipher' => 'Blowfish',
'padding' => 'space'});
undef $/;
print PT $cipher->decrypt(<CT>);
close(CT);
close(PT);
exit(0)
# EOS
============================================================
Any thoughts as to what I am doing wrong? I shouldn't have to use the $cipher->start('encrypting'); and $cipher->finished(); methods since the $cipher->(encrypt or decrypt)(<TEXT>); method is supposed to take care of this.
Thanks in advance.