How can we encrypt the username and password using PHP?

Answer Posted / indrajit saha

This is an example Login with encrypted password:-
---------------------------------------------------
<?php
echo "Encrypting <b>testing</b> using md5: ".md5("testing");
echo "<br />";
echo "Encrypting <b>testing</b> using sha1: ".sha1("testing");
?>

Output:-
---------
Encrypting testing using md5: ae2b1fca515949e5d54fb22b8ed95575
Encrypting testing using sha1:
dc724af18fbdd4e59189f5fe768a5f8311527050

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I get csrf token?

724


What is apache and php?

672


Is php fully object oriented?

653


How to register a variable in PHP session?

699


What are the advantages of stored procedures, triggers, indexes in php?

714


What are advantages of .htaccess?

708


Can you pass an array into a function?

760


What is the difference between client-side and server-side programming?

718


Is it more secure to use cookies to trfer session ids?

701


What backslash character will match whitespace?

752


What is the best practice for running mysql queries in php? Consider the risk of sql injection.

764


How to create a session? How to set a value in session?

716


How do you define a constant?

717


What is a query give example?

712


How to get a total number of elements used in the array?

703