in reply to Re: Crypt::CBC, Blowfish and Salt problem
in thread Crypt::CBC, Blowfish and Salt problem

Ok, I added that but was told by the system that salt was incompatible with randomiv, so I removed the salt entry and get this message now:

"Ciphertext does not begin with a valid header for 'randomiv' header mode"

Here is my new code at the bottom of the subroutine:
my $cipher = Crypt::CBC->new( -key => $key, -cipher => 'Blowfish', -header => 'randomiv' );
Any other ideas?

Richard
PS> Thank you for your assistance... and No those are not my real keys, I put some testing ones in... Mine are like 250 bytes long or so.

Replies are listed 'Best First'.
Re^3: Crypt::CBC, Blowfish and Salt problem
by samtregar (Abbot) on Feb 18, 2008 at 22:53 UTC
    Huh. Maybe you've got a mix of 'salt' and 'randomiv' data? Your encrypt routine has presumably been working since the change - only decryption has been bombing. You might try wrapping the first try in an eval - if it fails, try again with the alternate option.

    -sam