422,757 Members | 1,365 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 422,757 IT Pros & Developers. It's quick & easy.

Getting wrong decrypted value

P: 2
Expand|Select|Wrap|Line Numbers
  1. my $iv = '0000000000000000';
  2.  
  3.      my $cipher = Crypt::CBC->new(
  4.                                    -key       => $key,
  5.                                    -cipher    => "Crypt::OpenSSL::AES",
  6.                                    -iv          => $iv,
  7.                                    -literal_Key => 1,
  8.                                    -header => 'none',
  9.                                    -padding => 'default'
  10.      );
  11.  
  12. $encrypt_decrypt_data = $cipher->decrypt_hex($data);
I am getting wrong decrypted value and also the i need to use PKCS#7 padding but i am not to change in the above cipher.Please help me to resolve this
Sep 13 '17 #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,204
You only provide half the puzzle here. Where's the code that encrypts the data?
Sep 13 '17 #2

P: 2
Hi,
actually I have been provided only with the encrypted data and key value and the above syntax i am using for decrypting, but its returning binary coded value whereas i have used hex syntax to decrypt
Sep 14 '17 #3

Post your reply

Sign in to post your reply or Sign up for a free account.