CodeIgniter Forums
Help with Encryption... - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Help with Encryption... (/showthread.php?tid=10196)

Help with Encryption... - El Forum - 07-22-2008

I am trying to help someone get some data out of a system that was designed using codeigniter. The originaly developer is long gone, and I am only somewhat familiar with codeigniter. For some reason the developer encrypted almost everything that went into the database, and I am now trying to decrypt one of the tables.
I know he was calling $this->load->library('encrypt'); and I have the encryption_key. My question is, how can I create a php page that will get all the info from my table (member_info) and display it unencrypted? Any help anyone can provide is greatly appreciated.


Help with Encryption... - El Forum - 07-22-2008



$sql = "SELECT * FROM member_info ;";
$query = $this->db->query($sql);

$table = '<table>';

foreach ($query->result() as $row)
   $table .= '<tr>';
   $table .= $this->encrypt->decode($row->title);
   $table .= $this->encrypt->decode($row->name);
   $table .= $this->encrypt->decode($row->email);
   $table .= $this->encrypt->decode($row->etc);
   $table .= $this->encrypt->decode($row->etc);
   // replace with the fieldnames
   $table .= '</tr>';

$table .= '</table>';

echo $table;