help with md5 !!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ScOrPi
Forum Commoner
Posts: 44
Joined: Fri Jul 09, 2010 8:01 am
Location: BAGHDAD - IRAQ

help with md5 !!

Post by ScOrPi »

Hi

i want to link between vBulletin and script that i made it

the problem is .. in my script i used md5 for password .. and it doesn't match with the same password in vBulletin

if a member have password of 123456 .. md5 would be different in the database of vBulletin

i need to know what is vBulletin use to encrypt password ?!
oscardog
Forum Contributor
Posts: 245
Joined: Thu Oct 23, 2008 4:43 pm

Re: help with md5 !!

Post by oscardog »

Amusingly I did this recently :)

vBulletin combines the password (so in your case 123456) with a unique salt (that's a column in the user database) and then MD5 encrypts it... Twice.

So to get from a regular string to a vBulletin password you would do the following:

Code: Select all

$encryptedPassword = md5(md5($plainTextPassword . $uniqueUserSalt));
(Obviously you would need to grab the salt from the database)
ScOrPi
Forum Commoner
Posts: 44
Joined: Fri Jul 09, 2010 8:01 am
Location: BAGHDAD - IRAQ

Re: help with md5 !!

Post by ScOrPi »

Thank you So much Dear .. that's very useful :)
ScOrPi
Forum Commoner
Posts: 44
Joined: Fri Jul 09, 2010 8:01 am
Location: BAGHDAD - IRAQ

Re: help with md5 !!

Post by ScOrPi »

oscardog wrote:Amusingly I did this recently :)

vBulletin combines the password (so in your case 123456) with a unique salt (that's a column in the user database) and then MD5 encrypts it... Twice.

So to get from a regular string to a vBulletin password you would do the following:

Code: Select all

$encryptedPassword = md5(md5($plainTextPassword . $uniqueUserSalt));
(Obviously you would need to grab the salt from the database)
it's like this

$password_hash = md5(md5($password_text) . $user_salt);

thank you bro ..
Post Reply