After reading about salts password hashing Id like to implement a simple version for an admin area to a site Im building.
If you have any good links with code that have
I don't have a link to available code, but what I've done in the past is to generate a randomized salt - $salt = rand(1,1000000000);
- and save it in a session. I pass that salt to a login page and then use JavaScript to create a SHA hash of the salt + password which is submitted rather than a plaintext password. Since the salt is stored in the session I can then use that to see if the login hash matches the salt + password hash stored in the db.