Welcome Guest, Not a member yet? Register   Sign In
Login with the encryption class
#2

[eluser]danmontgomery[/eluser]
You really should not be storing passwords with two-way encryption. If you're set on this course, it looks something like:

Code:
$this->db->where('email' => $this->encrypt->encode($email))->where('password' => $this->encrypt->encode($password))->get('users');

If you decide to store passwords with a one-way hash, as you should, the logic is the same, just using whichever hashing method you decide.

Code:
$this->db->where('email' => $this->encrypt->encode($email))->where('password' => $this->encrypt->sha1($password))->get('users');


Messages In This Thread
Login with the encryption class - by El Forum - 04-20-2011, 03:47 AM
Login with the encryption class - by El Forum - 04-20-2011, 04:44 AM
Login with the encryption class - by El Forum - 04-20-2011, 06:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB