function _encrypt($str, $data) { // Get the Access lib config file include(APPPATH.'config/access.php'); $hash = sha1($data['username'] . $data['join_date']); $key = sha1($config['encrypt_key'] . $hash); return base64_encode(mcrypt_encrypt(MCRYPT_BLOWFISH, substr($key, 0, 56), $str, MCRYPT_MODE_CFB, substr($config['encrypt_key'], 0, 8))); }