Welcome Guest, Not a member yet? Register   Sign In
md5 to sha1
#14

[eluser]BrianDHall[/eluser]
How do you know it's been appended? ...well, you don't, really. You just have to check $static_salt before use and make sure it has the value you were expecting.

If you already have passwords stored one way and you want to change it you could do something like:

Code:
$password = 'password';

if ($stored_password == md5($password) || $stored_password == md5($password . $salt) || $stored_password == sha1($password) || $stored_password == sha1($password . salt)

But you know, you don't want to do that if you don't want backwards compatibility for already stored passwords.


Messages In This Thread
md5 to sha1 - by El Forum - 10-19-2009, 11:24 AM
md5 to sha1 - by El Forum - 10-19-2009, 12:14 PM
md5 to sha1 - by El Forum - 10-19-2009, 12:17 PM
md5 to sha1 - by El Forum - 10-19-2009, 12:28 PM
md5 to sha1 - by El Forum - 10-19-2009, 12:42 PM
md5 to sha1 - by El Forum - 10-19-2009, 12:47 PM
md5 to sha1 - by El Forum - 10-19-2009, 03:07 PM
md5 to sha1 - by El Forum - 10-20-2009, 12:13 PM
md5 to sha1 - by El Forum - 10-21-2009, 01:07 AM
md5 to sha1 - by El Forum - 10-21-2009, 02:24 AM
md5 to sha1 - by El Forum - 10-21-2009, 11:11 AM
md5 to sha1 - by El Forum - 10-21-2009, 12:13 PM
md5 to sha1 - by El Forum - 10-22-2009, 11:36 AM
md5 to sha1 - by El Forum - 10-22-2009, 04:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB