PHP hasing question - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Other (
https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (
https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: PHP hasing question (
/showthread.php?tid=412184)
PHP hasing question -
Mado - 01.02.2013
Hi,
I have a small question about hashing information in PHP and SQL:
I know with the HashBytes function you can hash an input (password in this case), do you have to re-hash the input upon logging in, and then see if the outputs match?
Re: PHP hasing question -
playbox12 - 01.02.2013
Of course. Whats the point of encrypting a password if it can be decrypted and read?
When a player registers or sets his password you hash it and store it in the DB.
When a player logs in, or has to input his password somewhere, you hash his input and compare it to the stored value.
Re: PHP hasing question -
Biesmen - 01.02.2013
Re-hash? If you hashed the input when the user registered, you obviously have to hash the input when he logs in as well.
Re: PHP hasing question -
Mado - 01.02.2013
Ah, alright. Already thought so but some people who said they had knowledge about it told me the point is decrypting it.
Thank you, though.