(1) 'pack("H*", $input)' is not behaving as expected, replace by
hex2bin($input).
(2) The iv strings (if other then empty strings) need to match at encryption
and decryption. We can only handle ciphers that allow for an empty iv
string for now. Otherwise, we'd have to store the iv somewhere at
encryption time and retrieve it back when decrypting.
… current encrypt/decrypt problem.
Two issues get addressed here:
(1) 'pack("H*", $input)' is not behaving as expected, replace by hex2bin($input).
(2) The iv strings (if other then empty strings) need to match at encryption and decryption. We can only handle ciphers that allow for an empty iv string for now. Otherwise, we'd have to store the iv somewhere at encryption time and retrieve it back when decrypting.