1# codeigniter 3 encryption
2
3# 1. set encrypt key in config.php
4$config['encryption_key'] = '4voiuM51pRE0p'; # value is whatever
5# 2. load library encryption.
6$this->load->library("encryption");
7# 3. encrypt process
8$ciphertext = $this->encryption->encrypt("plaintext");
9# 4. decrypt process
10echo $this->encryption->decrypt($ciphertext);