user_guide_src/source/installation/upgrade_encryption.rst
Upgrade Encryption ##################
.. contents:: :local: :depth: 2
Documentations
Encryption Library Documentation CodeIgniter 3.x <http://codeigniter.com/userguide3/libraries/encryption.html>_Encryption Service Documentation CodeIgniter 4.x </libraries/encryption>What has been changed
MCrypt has been dropped, as that has been deprecated as of PHP 7.2.Upgrade Guide
$config['encryption_key'] = 'abc123'; moved from application/config/config.php to public $key = 'abc123'; in app/Config/Encryption.php.encryption-compatible-with-ci3.$this->load->library('encryption'); with $encrypter = service('encrypter'); and change the methods for encryption and decrypting like in the following code example.Code Example
.. literalinclude:: upgrade_encryption/ci3sample/001.php
.. literalinclude:: upgrade_encryption/001.php