Welcome Guest, Not a member yet? Register   Sign In
CakePHP hashed passwords in Codeigniter
#2

[eluser]InsiteFX[/eluser]
Hashing using sha1 is one way so your users would have to change their passwords.

Unless you can get the hash key and salt key from Cake there's nothing you can do!

Use the cifer key for the CI config encryption key and then try the sha-1.

Try this:
Code:
// -----------------------------------------------------------------------

/**
  * hash_salt()
  *
  * Hashes the users password with SHA1 and the 32-bit encryption key.
  *
  * NOTE: Do not change the encryption Key once it is set or you will be
  *       Asking for trouble! Like not being able to login again!
  *
  * @access public
  * @param string - $password
  * @retrun mixed - the 32 char encrypted password
  */
public function hash_salt($password)
{
  return hash('SHA1', $password . $this->CI->config->item('encryption_key'));
}

Set the ./application/config/config.php - config key encrpytion to '32185858124818979731547474'

If this is in your Auth library then you will need to get the CI super object.


Messages In This Thread
CakePHP hashed passwords in Codeigniter - by El Forum - 05-23-2012, 04:40 PM
CakePHP hashed passwords in Codeigniter - by El Forum - 05-23-2012, 04:49 PM
CakePHP hashed passwords in Codeigniter - by El Forum - 05-23-2012, 05:33 PM
CakePHP hashed passwords in Codeigniter - by El Forum - 05-23-2012, 07:22 PM
CakePHP hashed passwords in Codeigniter - by El Forum - 05-23-2012, 09:50 PM
CakePHP hashed passwords in Codeigniter - by El Forum - 05-24-2012, 01:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB