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