![]() |
Password encryption method
Hey I've recently been trying to code my own user registration/login system for my site that will work alongside VB but I cannot for the life of me work out the EXACT method VB uses for encryption when setting/reading their set password cookie. I know they use an md5 mix of the persons password and that randomly generated key in their user row but aside from that i cannot work out the specifics. Could someone help me out with the EXACT encryption method they use in the form of an example?
Thanks SO much in advace =) |
md5(md5(md5(password) . 'salt')) . 'LicenseNo')
|
Really? Didn't realise it used my license number in there, lemme try =)
|
Didnt work you have an extra ) in there somewhere?
|
echo md5(md5(md5($row['password']) . $row['salt']) . 'custid');
echo md5(md5(md5($row['password'] . $row['salt'])) . 'custid'); Tried both of those and neither match the cookie =( |
I guess $row['password'] is the value of column password in table user?
This ia already md5(md5('password') . 'salt') And it is not CustID but LicenseNo (found at the top of each PHP file). |
Cheers, lemme try.
|
ok I tried it like this:
echo md5($row['password'] . 'LicenseID'); Yet it still doesnt match =( Also I confirmed that this is definately my license ID and not my customer ID. |
and yep $row['password'] is the password field from the database.
|
Hmm, does work for me
|
Quote:
Like Kirby said, you can with that formula calculate the hash of a userinputed password to compaire to the (hashed) password stored in the database, to see if it matches. |
Quote:
|
Quote:
Quote:
Quote:
Oops re-read the whole thing again, and i think i made a mistake here. You're probably right that he already understood it correct. |
Nah I can't get it heh, I'm full on trying all combinations of the password and my license ID but I doesn't salt go in there somewhere? And yeah I'm trying to compare the set cookie with the persons password to see if they REALLY are logged in.
|
As said, the password stored in the database is md5(md5(password) . salt).
The password stored in cookies is md5(md5(md5(password) . salt) . licensenumber). |
Sorry to go slightly off topic, but what is the "salt" bit ?
|
Quote:
|
Ok got it working, thanks heaps for the help =)
|
Quote:
|
Hello people,
can somebody help me with my SQL. I have the same problems as above, and still cant get it working. Here is mySQL syntax SELECT MD5(CONCAT(MD5("6536e4053b7eb3375d3ef92acceab8e2") , "Lxxxxxxx")); the hash above is the one found in my password column in the user table I took the licence number out of the post, but it is the L number at the top of all my PHP pages, however I cant get this to match the cookie value for the userpassword. Can any body help ? Graham |
This code might help you:
Code:
/* password correct? */ |
Hi. Been having problems also:
<cfset hash1 = "#hash('lakisic1')# . salt"> <cfset hash2 = "#hash(hash1)# . ******"> <cfoutput>#hash(hash2)#</cfoutput> That's what I tried. Any other ideas? |
Quote:
Sorry, I am not familiar with ColdFusion syntax so I can't help you there. |
All times are GMT. The time now is 03:57 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|