I would create a library integrated with Twitter Api and save the data in the configuration file in application / config / , as indicated in this link.
To like Twitter, just analyze:
$this->load->library('encrypt'); echo $this->encrypt->encode('your given secret here');
Take the output, save it inside the configuration file and when you extract it:
$this->load->library('encrypt'); $str_secret = $this->encrypt->decode($config['secret']);
- Encryption
-Do not forget to set the key as described in this link.
Please note that they require you to do this for maximum security if someone gains control of your ftp or similar. However, if it can be decoded, it can be read. This is not a final decision, but simply a more reliable one.
source share