I am currently developing a Document Authentication System and I want the Passwords of the users to be hashed or encrypted ..
So my question is, what is the best and most secure TWO WAY Hashing or Encrypting method I will use ..
I am currently developing a Document Authentication System and I want the Passwords of the users to be hashed or encrypted ..
So my question is, what is the best and most secure TWO WAY Hashing or Encrypting method I will use ..
As it has been suggested in the comments above the best and easy way is to use
password_hash();
andpassword_verify();
more info is available in the php.net website, and also make use of prepared statements either with mysqli or pdo in my basic user registration i made use of PDO.Please not this is just a basic example of how to use password_hash and password_verify();
we will use the
password_hash()
upon registration and password_verify() upon logindb.php
The above script makes connection to our database.
register.php
Login.php
This should do its very basic password hash is available in the manual here and here
password_verify() also available here
Please make use of php 5.6 or above of which u were supposed to already do.
That's about it. Hope this will point you to the correct direction.
incase a user forget a password, well there are many ways to reset the user password, one basic way is to have an autho token column on ur db.
The following way is very basic for beginners just to kickoff your career lol ;)
Then reset passwordpage