in reply to Re: Crypt Blowfish
in thread Crypt Blowfish

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: Crypt Blowfish
by moritz (Cardinal) on Jul 15, 2008 at 13:43 UTC
    Here is a short, working example:
    #!/usr/bin/perl use Crypt::Blowfish; use strict; use warnings; my $key = pack("H16","0123456789ABCDEF"); my $crypt = new Crypt::Blowfish $key; my $ciphertext = $crypt->encrypt('8chars12'); my $decrypt = new Crypt::Blowfish $key; print $decrypt->decrypt($ciphertext), $/;

    Somehow your pack and unpack statements have messed it up. I'd suggest you start from the working sample, and add symmetric pack and unpacks to that, and verify that it works after each iteration.