SA-MP Forums Archive
Urgh, I bloody hate hashing! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Urgh, I bloody hate hashing! (/showthread.php?tid=189633)



Urgh, I bloody hate hashing! - Moglizorz. - 12.11.2010

Trying to get MD5 Salted hashing to check if the inputtext is the same as the user_form_salt table on my phpBB Forum database, and it's always saying it's wrong with the following code:

Password Checking:
http://pastebin.com/6z11J2AD

Stock:
http://pastebin.com/fBgQUSx5

Password = test123

user_form_salt:55a99d99a5dce979
server checks: 28E7C0121C2CAEA9DA190EB0C7BB5872

Any ideas?


Re: Urgh, I bloody hate hashing! - DRIFT_HUNTER - 12.11.2010

Remove hash?


Re: Urgh, I bloody hate hashing! - Moglizorz. - 12.11.2010

I'm using phpBB's users, they're hashed, so.. that's not really an option.


Re: Urgh, I bloody hate hashing! - The_Moddler - 12.11.2010

Use Whirpool.


Re: Urgh, I bloody hate hashing! - Westie - 12.11.2010

Just use mySQL's MD5 function.

And how can he use Whirlpool if PHPBB is MD5?


Re: Urgh, I bloody hate hashing! - Moglizorz. - 12.11.2010

Quote:
Originally Posted by The_Moddler
Посмотреть сообщение
Use Whirpool.
.. with phpBB? How?


Re: Urgh, I bloody hate hashing! - The_Moddler - 12.11.2010

Quote:
Originally Posted by Westie
Посмотреть сообщение
Just use mySQL's MD5 function.

And how can he use Whirlpool if PHPBB is MD5?
Ah then nevermind.


Re: Urgh, I bloody hate hashing! - Moglizorz. - 12.11.2010

Quote:
Originally Posted by Westie
Посмотреть сообщение
Just use mySQL's MD5 function.

And how can he use Whirlpool if PHPBB is MD5?
How exactly do you then use salt with that?


Re: Urgh, I bloody hate hashing! - Westie - 12.11.2010

Moglizorz, here's a little example.

SELECT MD5("dsadaddaddsadad");

How can you simulate that in PAWN using format?

Or, are you too lazy?

pawn Код:
format(Query, sizeof(Query), "SELECT * FROM phpbb_users WHERE username = '%s' AND user_password = MD5('%s%s')", Escape[0], inputtext, salt);