![]() |
decrypt data encrypted by CI 2.4 with CI 3.1 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: decrypt data encrypted by CI 2.4 with CI 3.1 (/showthread.php?tid=71362) |
decrypt data encrypted by CI 2.4 with CI 3.1 - mnoman - 08-05-2018 Hi, After upgrading my application from CI 2.4 to CI 3.1, including changing Encrypt lib to Encryption, I found all decoded data returned empty strings. Is there an easy way to make the new encryption library decode this data? I think I need to use the correct parameters here: PHP Code: $this->encryption->decrypt($legacy_encoded_string,array( any idea? Thank you RE: decrypt data encrypted by CI 2.4 with CI 3.1 - mnoman - 08-05-2018 I think all I need is the parameters of this functions: $this->encryption->decrypt($coded_string,array( 'cipher' => MCRYPT_RIJNDAEL_256, 'mode' => MCRYPT_MODE_CBC, 'key' => $key, )); what I use here to make this function decoded data by the legacy encrypt library? RE: decrypt data encrypted by CI 2.4 with CI 3.1 - skunkbad - 08-05-2018 (08-05-2018, 03:35 AM)mnoman Wrote: I think all I need is the parameters of this functions: I use the blowfish cipher, and for me this worked: PHP Code: <?php RE: decrypt data encrypted by CI 2.4 with CI 3.1 - mnoman - 08-05-2018 Thank you for your feed back. Unfortunately, this does not work I installed this library and I used it like $this->my_legacy_decrypt->blowfish_cbc_decrypt($encoded,$key); the result was some weird chars like A`p�Fp�aĸ��s��ݥ��, possibly binary (previously I got empty strings only) Any idea? RE: decrypt data encrypted by CI 2.4 with CI 3.1 - mnoman - 08-05-2018 nevermind .. I think I have to do it the hard way! RE: decrypt data encrypted by CI 2.4 with CI 3.1 - skunkbad - 08-05-2018 (08-05-2018, 10:58 AM)mnoman Wrote: Thank you for your feed back. Unfortunately, this does not work If you didn't originally encrypt with the blowfish cipher, then this wouldn't work for you. You'll need to tweak it for whatever cipher you used. |