CodeIgniter Forums
codeiginter encrypt and decrypt producing new value after each refresh - 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: codeiginter encrypt and decrypt producing new value after each refresh (/showthread.php?tid=68834)



codeiginter encrypt and decrypt producing new value after each refresh - vidhyaprakash85 - 09-01-2017

Sir,

I am using codeiginter 3.1.5 in MAMP Pro.

I have used encrypt library to encrypt the data and send in the url.

When I try to decrypt is not decrypting to the actual value. Each time when I refresh it gives new value because of this I can't get the original value.

encrypt value - wpK8mhnVpEhfc1rv9aDq6A==
decrypt - <<nothing>>

actual value = 1

please help me I tried a lot forums to find the solution.


RE: codeiginter encrypt and decrypt producing new value after each refresh - InsiteFX - 09-02-2017

Did you create an encryption key?

Did you store the encryption key in the ./application/config/config/php file?


RE: codeiginter encrypt and decrypt producing new value after each refresh - vidhyaprakash85 - 09-02-2017

(09-02-2017, 03:33 AM)InsiteFX Wrote: Did you create an encryption key?

Did you store the encryption key in the ./application/config/config/php file?

Yes I have stored.. no problem in that.

encryption value changes for every refresh and can't be decrypted


RE: codeiginter encrypt and decrypt producing new value after each refresh - Gustavo Martins - 09-02-2017

Can you show us your code?


RE: codeiginter encrypt and decrypt producing new value after each refresh - Narf - 09-04-2017

It is supposed to be different each time; that doesn't mean it can't be decrypted.