CodeIgniter Forums
codeigniter 3.1.6 decrypt fails sometimes to get the correct value - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: codeigniter 3.1.6 decrypt fails sometimes to get the correct value (/showthread.php?tid=69421)



codeigniter 3.1.6 decrypt fails sometimes to get the correct value - damascene10 - 11-20-2017

I am using codeigniter 3.1.6. I am using encryption class and I loaded it through config/autoload.

PHP Code:
$autoload['libraries'] = array('database''session''xmlrpc','form_validation','encryption'); 

I have set the encryption key fromĀ 
PHP Code:
echo bin2hex($this->encryption->create_key(16)); 

PHP Code:
$config['encryption_key'] = hex2bin('ccf8ce9386eb83d67a3a334748aca064'); 
I am encrypting and decrypting usingĀ 
PHP Code:
$this->encryption->encrypt($data);
$this->encryption->decrypt($encrypteddata); 

The problem is that for 2 instances I succeed and the next one the form crash as you will see on the image attached.

Assistance is highly needed.


RE: codeigniter 3.1.6 decrypt fails sometimes to get the correct value - Narf - 11-20-2017

What do you mean by "2 instances"?
The screenshots shown an error notice that you're accessing a non-existent property in a view file; that shouldn't have anything to do with encryption.