CI_Encrypt::set_cipher()

set_cipher($cipher)

Parameters:
  • $cipher (int) – Valid PHP MCrypt cypher constant
Returns:

CI_Encrypt instance (method chaining)

Return type:

CI_Encrypt

Permits you to set an Mcrypt cipher. By default it uses MCRYPT_RIJNDAEL_256. Example:

$this->encrypt->set_cipher(MCRYPT_BLOWFISH);

Please visit php.net for a list of available ciphers.

If you’d like to manually test whether your server supports MCrypt you can use:

echo extension_loaded('mcrypt') ? 'Yup' : 'Nope';
doc_CodeIgniter
2016-10-15 16:31:31
Comments
Leave a Comment

Please login to continue.