Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14346

codeigniter 3.1.6 decrypt fails sometimes to get the correct value

$
0
0
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.

.jpg   decryption.jpg (Size: 48.51 KB / Downloads: 6)

.jpg   success.jpg (Size: 34.39 KB / Downloads: 4)

Viewing all articles
Browse latest Browse all 14346

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>