How to Create Your Own Encrypted Password Using PHP

Prem Tiwari - - WordPress Snippets

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.

Prem Tiwari

Prem Tiwari is the founder of and also a professional developer and a blogger by hobby.

Tags: , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.