use Crypt::ECB; use Crypt::Blowfish; my $key = shift or die "Usage crypt_ecb_bf \n"; my $crypt = Crypt::ECB->new; $crypt->padding(PADDING_AUTO); $crypt->cipher('Blowfish') || die $crypt->errstring; $crypt->key("$key"); my $ciphertext = $crypt->encrypt_hex("Hello World!"); #since cryptolabs is outputting hex my $plaintext = $crypt->decrypt_hex($ciphertext); print "$key\n"; print "$ciphertext\n"; print "$plaintext\n";