PHP hasing question
#1

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?
Reply
#2

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.
Reply
#3

Re-hash? If you hashed the input when the user registered, you obviously have to hash the input when he logs in as well.
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)