问题
When I encrypt my ID using encrypt library that time it gives me an error like :
Thanks for your help
回答1:
codeigniter already mention it on their official documentation of encrypt Library
This library has been DEPRECATED and is only kept for backwards compatibility. Please use the new Encryption Library.
use new Encryption Library. https://codeigniter.com/userguide3/libraries/encryption.html
回答2:
I'm using php 7.2 and I can solve using the new library encryption recommend.
Example:
// #Encrypt
$this->load->library('encryption');
$to_encrypt="some value";
$this->encryption->initialize(
array(
'cipher' => 'aes-256',
'mode' => 'ctr',
'key' => $this->config->config['encryption_key']
)
);
echo $this->encryption->encrypt($to_encrypt);
More Info -> https://codeigniter.com/userguide3/libraries/encryption.html
来源:https://stackoverflow.com/questions/45341314/function-mcrypt-get-iv-size-is-deprecated-in-codeigniter-on-php-version-7-1