Getting wrong decrypted value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NeetuG
    New Member
    • Sep 2017
    • 2

    Getting wrong decrypted value

    Code:
    my $iv = '0000000000000000';
    
    	 my $cipher = Crypt::CBC->new(
    								   -key       => $key,
    								   -cipher    => "Crypt::OpenSSL::AES",
    								   -iv          => $iv,
    								   -literal_Key => 1,
    								   -header => 'none',
    								   -padding => 'default'
    	 );
    
    $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
    Last edited by Frinavale; Sep 13 '17, 03:04 PM.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You only provide half the puzzle here. Where's the code that encrypts the data?

    Comment

    • NeetuG
      New Member
      • Sep 2017
      • 2

      #3
      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

      Comment

      Working...