我想我的网址参数进行加密,例如: http://localhost/myapps/user/profile/john 到 http://localhost/myapps/user/profile/URL在Codeigniter中如何加密和解密。每次刷新加密值变化
在笨{加密“约翰”的值}。
其他手每刷新一次加密值改变为特定数据。但我需要这个静态(对于特定输入值总是唯一的值)。
我想我的网址参数进行加密,例如: http://localhost/myapps/user/profile/john 到 http://localhost/myapps/user/profile/URL在Codeigniter中如何加密和解密。每次刷新加密值变化
在笨{加密“约翰”的值}。
其他手每刷新一次加密值改变为特定数据。但我需要这个静态(对于特定输入值总是唯一的值)。
,你可以用它作为笨库。 – Pedro
谢谢。我已经实现了这一点,但每一次刷新加密值都会改变,所以我不能回到原始数据。 – imsyedahmed
抱歉,现在这工作正常。 – imsyedahmed
$this->load->library('encrypt');//load this library.
$config['encryption_key'] = "YOUR KEY"; // application/config/config.php
$this->encrypt->encode();//Data encryption and returns it as a string
$this->encrypt->decode();//Decrypts an encoded string.
请详细解释如何解决问题 – Adonis
http://stackoverflow.com/a/10416814/337055 – Philip