Please try to search StackOverflow before asking a question. Many questions are already answered. For example:
- PHP & MySQL compare password
- how do I create a mySQL user with hash(‘sha256’, $salt . $password)?
- Secure hash and salt for PHP passwords
- User Login with a single query and per-user password salt
- Non-random salt for password hashes
Hi
I want that nobody can see my password even in database..
So i used hash function like this
$passowrd_hash=hash('shal',$_POST['password']);
Now easily I can store this password_hash value into database. It will be something like in encrypted form.
Now user know its original password he don't know this encrypted password.
Now if he try to login through this original password..He is not able to login.
So is there any method so that it can be decrypted and user can make log in. So he can achieve both security of password as well as login again.
How to do this?
you need to hash the user input password and compare hashes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With