in reply to How to do encryption in perl with aes-128-cbc

How did you install Crypt::CBC and/or Crypt::Cipher::AES?

If you did not install them through the cpan client, but some other way, most likely that is where you went wrong.

Update: I now see that they are all part of the CryptX distribution. So something in the installation of that distribution went wrong. I recommend to properly reinstall CryptX.

Replies are listed 'Best First'.
Re^2: How to do encryption in perl with aes-128-cbc
by saysuri (Initiate) on Aug 30, 2013 at 09:03 UTC
    If you don't mind can you please help me in installing the module 'Cryptx'.

    thanks and waiting for your replay.

    I got ppm and cpan. and i'm using windows 32 bit machine.

      You type in the following:

      cpan CryptX

      The cpan tool will then fetch and install all required modules for CryptX and CryptX itself.

      If you have to ask this, then I really wonder what you tried before to install the module.

        Actually i usd perl package management and in that there are no direct packages and wondering for the exact pkg.

        found it and installed it and now i'm able to run it in cmd but while executing it in 'padre' it still showing the same error.

        but in the code i've used 32 bit key and 32 bit iv values. now it is asking for the 16 bit iv values.

        C:\Windows\system32>ppm install CryptX Downloading CryptX-0.013...done Unpacking CryptX-0.013...done Generating HTML for CryptX-0.013...done Updating files in site area...done 137 files installed this is the error message : Initialization vector must be exactly 16 bytes long when using the Cipher::AES cipher at cipher2.pl line 6
        use Crypt::CBC; use Crypt::OpenSSL::AES; my $key = '2bbacc08ace4f431eafc8dca13908007'; my $iv = '5345435245545f4b45595f3132333435'; my $cbc = Crypt::CBC->new( -cipher=>'Cipher::AES', -key=>$key, -iv=>$i +v ); my $ciphertext = $cbc->encrypt("secret data"); print $ciphertext;

        help me with this. is there any way that i can specify the length of key and iv values.??