Codeigniter mcrypt encode and decode |
Can anyone help me on how to set a few parameters in codeigniter and encode and decode an array? I was looking over a few hours on the Internet and didn't find any answer.
I'm looking for something like this, to take some array: Code: Array to encode with these parameters: Code: mcrypt_key='12som456ething99'; and later to decode and print array. Anyone?
All you need to do is serialize the array before you encode it, and then unserialize the array after you decode it. Look in the PHP manual for serialize and unserialize functions.
How to set these parameters first?
I know for serialize. How to write all that in CI?
I don't see anything in the docs where you can set your own IV. I don't think it's possible using the CI3.0.X Encryption library. Maybe somebody (like Narf) can tell you a solution.
|
Welcome Guest, Not a member yet? Register Sign In |