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

Explain the difference between $var and $$var?

537


What is the difference between == and === operator in PHP?

470


What is the w3c?

8551


How many columns can be added in a table in mysql?

498


What is htaccess? Why do we use this and where?

498






Explain about the data types in PHP?

556


What is the string concatenation operator in php?

524


What is __ construct in php?

543


What is difference between post and put in rest?

521


What are the differences between php3 and php4 and php5? What is the current stable version of php? What advance thing in php7?

622


How does csrf attack work?

535


Give the case where we can use get and we can use post methods?

563


Is PHP runs on different platforms (Windows, Linux, Unix, etc.)?

531


Explain Traits in PHP?

531


What is the current stable version of php?

554