once Again back with one more question.
can some one please help me how to use aes-128-cbc in perl.
I got the information like:
https://metacpan.org/module/Crypt::O...Cipher::AES128
but How can i use this in encrypting in perl.
I got some data,key and iv values and i need to encrypt it using the aes-128-cbc.
Here is some more additional information:
Expand|Select|Wrap|Line Numbers
- use Crypt::Mode::CBC;
- my $key = '(32bit key value)';
- my $iv = '(32bit iv value)';
- my $cbc = Crypt::Mode::CBC->new('AES');
- my $ciphertext = $cbc->encrypt("secret data", $key, $iv);
- print $ciphertext;
Uncaught exception from user code:
Can't locate loadable object for module CryptX in @INC (@INC contains: C
:/Dwimperl/perl/site/lib C:/Dwimperl/perl/vendor/lib C:/Dwimperl/perl/lib .) at
C:/Dwimperl/perl/site/lib/Crypt/Cipher.pm line 5
Compilation failed in require at C:/Dwimperl/perl/site/lib/Crypt/Cipher.pm line
5.
BEGIN failed--compilation aborted at C:/Dwimperl/perl/site/lib/Crypt/Cipher.pm l
ine 5.
Compilation failed in require at C:/Dwimperl/perl/site/lib/Crypt/Mode/CBC.pm lin
e 8.
BEGIN failed--compilation aborted at C:/Dwimperl/perl/site/lib/Crypt/Mode/CBC.pm
line 8.
Compilation failed in require at cipher1.pl line 1.
BEGIN failed--compilation aborted at cipher1.pl line 1.
at cipher1.pl line 1
Press any key to continue . . .
-----------------------------------------------------
or
Expand|Select|Wrap|Line Numbers
- use Crypt::CBC;
- use Crypt::Cipher::AES;
- my $key = '(32bit key value)';
- my $iv = '(32bit iv value)';
- my $cbc = Crypt::CBC->new( -cipher=>'Cipher::AES', -key=>$key, -iv=>$iv );
- my $ciphertext = $cbc->encrypt("secret data");
- print $ciphertext;
Uncaught exception from user code:
Can't locate loadable object for module CryptX in @INC (@INC contains: C
:/Dwimperl/perl/site/lib C:/Dwimperl/perl/vendor/lib C:/Dwimperl/perl/lib .) at
C:/Dwimperl/perl/site/lib/Crypt/Cipher/AES.pm line 8
Compilation failed in require at C:/Dwimperl/perl/site/lib/Crypt/Cipher/AES.pm l
ine 8.
BEGIN failed--compilation aborted at C:/Dwimperl/perl/site/lib/Crypt/Cipher/AES.
pm line 8.
Compilation failed in require at cipher2.pl line 2.
BEGIN failed--compilation aborted at cipher2.pl line 2.
at cipher2.pl line 2
Press any key to continue . . .
-------------------------------------------------------
In this case can some one please do let me know how can i check if 'CryptX' and (related modules) are installed properly in my machine.
Thanks in adv...