[Tutorial] Securing MySQL Password from Hackers
Posted: Tue Apr 20, 2010 8:37 am
Not much of a tutorial, just a how-to. You should know how to do the following steps already. If not, take a tutorial.
REGISTRATION
Before registering a password to a database, encrypt it.
Once you've encrypted it, register that to the database.
LOGGING IN
When logging in, you gotta make sure that the entered password gets encrypted into the same thing as it was in the database.
This is case-sensitive, seing as one tiny difference in a password can totally change the encryption.
REGISTRATION
Before registering a password to a database, encrypt it.
Code: Select all
bin2hex(mhash(MHASH_sha256,$pass));LOGGING IN
When logging in, you gotta make sure that the entered password gets encrypted into the same thing as it was in the database.
This is case-sensitive, seing as one tiny difference in a password can totally change the encryption.