How to Create Your Own Encrypted Password Using PHP

Create your own encrypted password using php

If you are developing a password-protected web site, you have to make a decision about how to store user password information securely. You can use predefine password encryption method.

Unsuitable for passwords for your Application

Why are common hashing functions such as md5 and sha1() unsuitable password for your application, because of now a modern computer can “reverse” these hashing algorithms, many security professionals strongly suggest against their use for password hashing. You can create your own password encryption using password_hash() see example bellow :

Above example will output the password which is similar to :


How to storage encrypted password Model in database

password_hash() is used to hash given string using strongest algorithm currently available to stored password in database. See the bellow example how to stored password using password_hash() method.

Share your love to share this post with your friends and join us on Facebook to be the first to learn the next great thing from freewebmentor.

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:

Article Tags: , , , , ,