📜  使用 codeigniter 3 加密 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:18.926000             🧑  作者: Mango

代码示例1
# 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);