CodeIgniter Forums
Encrypting Session Data Stored in Database - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Encrypting Session Data Stored in Database (/showthread.php?tid=27254)



Encrypting Session Data Stored in Database - El Forum - 02-04-2010

[eluser]Eric Cope[/eluser]
Does CI support encryption of the data stored in the database? I am not talking about the data stored in the cookie, but the string stored in the database?


Encrypting Session Data Stored in Database - El Forum - 02-05-2010

[eluser]darkhouse[/eluser]
You could probably extend the session library and make it use the encryption library to encrypt the serialized data before you store it, and then decrypt it when you retrieve it. You would just need to modify the sess_write and sess_read functions where it serializes and unserializes the data, respectively, with your encryption.


Encrypting Session Data Stored in Database - El Forum - 02-05-2010

[eluser]Eric Cope[/eluser]
that's what I assumed, but I did not know if there was an undocumented feature...