PHP

Hashing a string in PHP

Deep
Written by Deep

Hashing is one way encryption. You can’t decrypt the string / data once you hashed it. Yes ! The foolish way exists to get the original password is to make random strings with alphanumeric and special characters. Hash it and match with existing password’s hash one by one.  It may take couple of years to get one.

There are several techniques / algorithm available in PHP to make hash of a string. Here I am using sha256 (best) to hash a password.

 

Leave a Comment