in reply to Blowfish problem (still)

I'm totally baffled by what you are trying to do. Encrypted text is pure binary, not character data. If you need to save the encrypted data in some context where you need text, then encode the encrypted data using uuencode or base64 (or hex or something similar).

Here is a simple example of how to use Crypt::CBC:

#!/usr/bin/perl -w use Crypt::CBC; use MIME::Base64; use strict; my $plainin = "Now is the time for all good time for all good men to come to the aid of their party. The quick brown fox jumped over the lazy dog's back.\n"; my $cipher = Crypt::CBC->new( {'key' => 'Richard', 'cipher' => 'Blowfish', }); my $cryptext = $cipher->encrypt($plainin); # if you need to save the cryptext as ASCII, use something # like uuencoding: my $cipher_uuenc = pack("u", $cryptext); # or Base64 encoding (not built in to Perl, may need to install module +) # (Use one or the other, not both. I just show both for pedagogical # purposes). my $cipher_base64 = encode_base64($cryptext); print "cipher_uuenc = $cipher_uuenc\n"; print "cipher_base64 = $cipher_base64\n"; my $cryptext2 = unpack("u", $cipher_uuenc); my $cryptext3 = decode_base64($cipher_base64); if ($cryptext2 eq $cryptext3) { print "Hey, they had better be equal!\n"; } else { print "Something is really screwed up!\n"; } my $cipherx = Crypt::CBC->new( {'key' => 'Richard', 'cipher' => 'Blowfish', }); my $plainout = $cipherx->decrypt($cryptext2); print "plainout =\n$plainout";