简体   繁体   English

URL如何在Codeigniter中加密和解密。 每次刷新加密值更改

[英]How URL encrypt and decrypt in Codeigniter. Every Refresh encrypted value change

i want to encrypt my url parameter such as: http://localhost/myapps/user/profile/john to http://localhost/myapps/user/profile/ {encrypted value of 'john'} 我想将我的url参数加密,例如: http:// localhost / myapps / user / profile / johnhttp:// localhost / myapps / user / profile / {'john'的加密值}

in codeigniter. 在codeigniter中。

otherhand every refresh encrypted value change for specific data. 另一方面,每次刷新加密值都会更改特定数据。 But i need this static (unique value for specific input value always). 但是我需要这个静态(总是特定输入值的唯一值)。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM