Welcome Guest, Not a member yet? Register   Sign In
md5 encryption
#1

[eluser]junaids[/eluser]
hi i have a registration module and i save user password using md5 encryption.
then on login i use md5 to encrypt the password and match it with database.
but it does not match
Code:
$this->db->from('user');
$this->db->where('username',$u);
$this->db->where('password', md5($pw));
echo md5($pw);

against a particular username and password with the echo statement i m getting pw as "7fa8282ad93047a4d6fe6111c93b308a "
while in the db the password is "7fa8282ad930"

the password in the db is just a part of password produced on login so i m unable to login why?


Messages In This Thread
md5 encryption - by El Forum - 05-06-2009, 11:31 AM
md5 encryption - by El Forum - 05-06-2009, 11:32 AM
md5 encryption - by El Forum - 05-06-2009, 12:20 PM
md5 encryption - by El Forum - 05-06-2009, 01:25 PM
md5 encryption - by El Forum - 05-06-2009, 04:48 PM
md5 encryption - by El Forum - 05-06-2009, 06:22 PM
md5 encryption - by El Forum - 05-07-2009, 10:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB