############### Security Helper ############### The Security Helper file contains security related functions. .. contents:: :local: .. raw:: html
Loading this Helper =================== This helper is loaded using the following code:: $this->load->helper('security'); Available Functions =================== The following functions are available: .. function:: xss_clean($str[, $is_image = FALSE]) :param string $str: Input data :param bool $is_image: Whether we're dealing with an image :returns: string Provides Cross Site Script Hack filtering. This function is an alias for ``CI_Input::xss_clean()``. For more info, please see the :doc:`Input Library <../libraries/input>` documentation. .. function:: sanitize_filename($filename) :param string $filename: Filename :returns: string Provides protection against directory traversal. This function is an alias for ``CI_Security::sanitize_filename()``. For more info, please see the :doc:`Security Library <../libraries/security>` documentation. .. function:: do_hash($str[, $type = 'sha1']) :param string $str: Input :param string $type: Algorithm :returns: string Permits you to create one way hashes suitable for encrypting passwords. Will use SHA1 by default. See `hash_algos()