How to secure password using encode and decode method to change it into encrypted form.
PHP gives us inbuilt md5() method which will mostly used to convert passwords. Because without Encryption password it can be easily readable + understandable by any human who has access to your web hosting’s control panel. But after encryption it will change into non understandable numeric digit + alphabet form. So here is the complete step by step tutorial for Encrypt and Decrypt password in PHP using md5 example tutorial.
How to Encrypt and Decrypt password in PHP using md5 example tutorial.
Code for encrypt-decrypt.php file.
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Encrypt and Decrypt Password</title> </head> <body> <?php $password = "Admin"; $EncryptPassword = md5($password); echo " Password Before Encryption = " . $password . '</br></br>' ; echo " Password After Encryption = " . $EncryptPassword ; ?> </body> </html>
Screenshot: