decrypt() returning incorrect result |
@kenjis
I applied the workaround that @ardimardiana referenced here https://forum.codeigniter.com/showthread...#pid406963 and got it working. In doing so I discovered the problem. CI4 is incorrectly guessing the cipher to use in decrypting the CI3 data as aes-256-ctr, when at least in my case, it is the CI3 standard aes-128-cbc cipher. As soon as I changed @ardimardiana's workaround code to: PHP Code: $ci3 = new Ci3encrypt(); The CI3 encryption library decrypted the input properly. I tried forcing the CI4 encryption to use aes-128-cbc and even though the documentation (https://codeigniter.com/user_guide/libra...initialize) shows a cipher option, I'm not seeing cipher or mode in \Config\Encryption.php. Were they removed from CI4 at some point after that documentation? |
Messages In This Thread |
decrypt() returning incorrect result - by objecttothis - 02-17-2023, 06:17 AM
RE: decrypt() returning incorrect result - by kenjis - 02-17-2023, 05:20 PM
RE: decrypt() returning incorrect result - by objecttothis - 02-18-2023, 09:56 AM
RE: decrypt() returning incorrect result - by kenjis - 02-18-2023, 05:28 PM
RE: decrypt() returning incorrect result - by objecttothis - 02-18-2023, 02:15 PM
RE: decrypt() returning incorrect result - by kenjis - 02-18-2023, 04:25 PM
RE: decrypt() returning incorrect result - by objecttothis - 02-19-2023, 05:44 AM
RE: decrypt() returning incorrect result - by kenjis - 02-21-2023, 05:39 PM
|