codeigniter加密后的字符串在注销后无法解密

$this->load->library('encrypt');
$encoded_string = $this->encrypt->encode('my_string_to_secure');

$this->load->library('encrypt');
$original_string_after_decode = $this->encrypt->decode('encoded_string ');

this code encodes and than decodes the given string properly

but when i set this encoded_string into cookie and after logout when i try to decrypt this encoded_string i am not able to decrypt this

i am using encryption key set in config file.

you need to put your encode string which is store in variable $encoded_string try

$original_string_after_decode = $this->encrypt->decode($encoded_string);

For more:- http://ellislab.com/codeigniter/user-guide/libraries/encryption.html