SRL Archive - Open Source Communities

Different hashes?


punkd

2012-05-19 03:55:48

I've been working on a group project for about 8 months now developing web software (cant state specifics since its one of a kind) and I'm having problems with MD5 hashes. They seem to generate different for the same string and obviously that's not going to work. Here is the reason: The client is going to register an account and obviously the account is going to be in a database. The password is going to be converted to MD5 and when the user tries to log in, the script converts their attempted password to MD5, compare and grant access/deny. But if the hash generates different every time for the same string then its useless.

I'm stuck. Any ideas??

Edit: Well, turns out symbols confuse the hell out of MD5. So I guess I'll edit the Registration page to not accept symbols.

Kyle Undefined

2012-05-19 04:26:42

What language are you using? I've never heard of that before, seems very odd.

Dgby714

2012-05-19 04:44:21

It's impossible.

MD5 is MD5 is MD5…

It's a specific function, unless the developer wrote the function wrong, they should output the same thing.

They may have different cases tho, so try lower-casing or upper-casing the string?

punkd

2012-05-19 04:52:19

Honestly I'm stuck, I can't answer any questions because everything I know is in my post -.- Its 2 am so idk if my brains not functioning as it should or It really doesn't work, kind of considering using a different method now. Ill find out in the morning if its me or the function.

ShawnjohnSJ

2012-05-20 13:35:04

Are you using non-ascii characters?

L00PH0LE

2012-08-15 09:14:23

You might want to use a more secure encryption method, md5 is pretty weak in terms of security. http://www.kellermansoftware.com/t-ArticleStrongestAlgo.aspx