in reply to CBC being a pain

In the last line, the "c" in "$cipher" is lower case. Do you have another variable named "$cipher"?

You should be aware that finish() may return characters that are part of the cryptext, so you need to append them. If you are just encrypting one small block, it's more convenient to call encrypt() instead of start(), crypt(), finish().

Replies are listed 'Best First'.
Re^2: CBC being a pain
by Pumeleon (Initiate) on Jan 23, 2005 at 01:16 UTC
    I still have problems after changing it to encrypt(); which I had done previously to making it start() crypt() and end(). I still get the same error. Is there something in the order in which the my $Shout line that would cause this?
    my $Cipher = Crypt::CBC->new( {'key' => "Still secret. +Quiet, you.", 'cipher' => 'Blowfish', 'iv' => '{3fd#t4^$#', 'padding' => 'null', 'regenerate_key' => 0, 'prepend_iv' => 0 }); my $Shout = $dbh->quote($Cipher->encrypt($q->param('Message')));
    And yes, unfortunately, I miss caps all the time. ;_;
      >>And yes, unfortunately, I miss caps all the time. ;_;

      I feel obligated to make some reference to strict here...

      If you aren't already using strict, maybe try that and see if another typo becomes obvious.