Encode with Encrypt class, Decrypt with Encryption class |
I'd like to be able to use the CI3 Encryption class to decrypt values that were "encoded" with the CI2 (deprecated) Encrypt class. So I set up a test controller and have been playing around, but no success. Method:
PHP Code: /** I need help though, because no matter what I try for the custom parameters, I can never get it right. I even tried to extend the Encryption class: PHP Code: public function legacy_decrypt( $base64_encoded, $key ) If I try to use the legacy_decrypt method, my debugging shows that the string is exactly what it should be compared to what it was before encoding with the Encrypt class. The data is the same, the key, the IV, and everything I can see is the same. The problem for me is that we have a lot of stored records that have been "encoded" using the Encrypt class, and it may be impossible (due to physical access issues) for me to get those records and work on them, yet there may be a time when we need to "decode" them and mcrypt is no longer on the server. If anyone can help I'd appreciate it. |
Messages In This Thread |
Encode with Encrypt class, Decrypt with Encryption class - by skunkbad - 06-18-2017, 08:17 AM
RE: Encode with Encrypt class, Decrypt with Encryption class - by Narf - 06-18-2017, 10:12 PM
RE: Encode with Encrypt class, Decrypt with Encryption class - by skunkbad - 06-18-2017, 10:33 PM
RE: Encode with Encrypt class, Decrypt with Encryption class - by Narf - 06-18-2017, 11:41 PM
RE: Encode with Encrypt class, Decrypt with Encryption class - by skunkbad - 06-19-2017, 07:49 AM
RE: Encode with Encrypt class, Decrypt with Encryption class - by Narf - 06-19-2017, 08:45 AM
RE: Encode with Encrypt class, Decrypt with Encryption class - by skunkbad - 06-19-2017, 09:26 AM
RE: Encode with Encrypt class, Decrypt with Encryption class - by Narf - 06-19-2017, 11:10 AM
|