MD5 & MD5 SALT
#1

I wanted to make forum basic registration system to my server. So user need to log IG, with his forum name. Problem is MD5 password encryption. I hashed my inputtext with MD5 and then i compared it with database password and they didn't match. I searched a little bit and i found something about salting. Now i can't think anymore, how should i compare salt and password with inputtext, are they realy matching?
Reply
#2

This is PHP function for salting

pawn Код:
function salt($password, $salt)
{
    return md5($password . md5($salt));
}
Reply
#3

Solved it, found a useful function.
pawn Код:
stock HashMyBBPassword(string[], salt[])
{
    new string2[96];
 format(string2, sizeof(string2), "%s%s", MD5_Hash(salt), MD5_Hash(string));
 for (new i; i < sizeof(string2); i++) string2[i] = tolower(string2[i]);
    format(string2, sizeof(string2), "%s", MD5_Hash(string2));
    SendClientMessageToAll( -1, string2);
    return string2;

}
Reply
#4

md5 here

http://www.solidfiles.com/d/d82bc7d702/md5.inc
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)