Welcome Guest, Not a member yet? Register   Sign In
Encrypt Library and get_key
#1

[eluser]Unknown[/eluser]
In looking at the get_key function within the Encrypt.php Library it looks it should be returning the md5 in 32-character hexadecimal format. However when echoing out the key it appears to be in the raw binary format.

What causes this behavior and how can I change it?

Code:
function get_key($key = '')
{
  if ($key == '')
  {
   if ($this->encryption_key != '')
   {
    return $this->encryption_key;
   }

   $CI =& get_instance();
   $key = $CI->config->item('encryption_key');

   if ($key == FALSE)
   {
    show_error('In order to use the encryption class requires that you set an encryption key in your config file.');
   }
  }

  return md5($key);
}




Theme © iAndrew 2016 - Forum software by © MyBB