How can we encrypt the username and password using PHP?

How can we encrypt the username and password using PHP?

How can we encrypt the username and password using PHP?

View Answers

November 15, 2010 at 10:50 AM

Hi,

If you want to encrypt username and password in the php login then use md5() or sha1() methods. These methods are providing the best encryption in the php.

The process of using md5() is:

$encrypted_username=md5($username);
$encrypted_password=md5($password);

The process of using sha1() is:

$encrypted_username=sha1($username);
$encrypted_password=sha1($password);

Thanks









Related Tutorials/Questions & Answers:
How can we encrypt the username and password using PHP?
encrypt the username and password using PHP
Advertisements
how to check username & password from database using jsp
Encrypt Password with JSP - JSP-Servlet
Username password
How to supress displaying username and password in Java Web Start 10.21.2.11 Using JRE version 1.7.0_21-b11 Java HotSpot(TM) Client VM
How can we solve this puzzle using java ?
What is the difference between PHP4 and PHP5?
simple code to write an read and write the login detail to a xml file using javascript ( username and password )
ModuleNotFoundError: No module named 'phpy'
How can we create a database using PHP and mysql?
How can we get second of the current time using date function?
How can we find the number of rows in a result set using PHP?
username and password in servlet
create webpage with table sql database using netbeans 6.8 with struts complete tutorial.(include username and password)
create webpage with table sql database using netbeans 6.8 with struts complete tutorial.(include username and password) 0 Answer(s)
How to Display Username After Login in JSP
What is the maximum size of a file that can be uploaded using PHP and how can we change this?
How we can integrate ASP .net website to payment gateway using SOAP xml request and response using wsdl.
validating username and password from database
Java swing store the encrypted password into database
can any one give the frogort password code using jsp,
Java Read username, password and port from properties file
How can I protect my database password ?
Create an HTML form login.html that accepts the username and password
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How can we know the number of days between two given dates using PHP?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How can we get the properties (size, type, width, height) of an image using php image functions?
How can we extract string 'roseindia.net ' from a string http://[email protected] net using regular expression of php?
struts2 how can we add an radio button to form using a class(doa)
struts2 how can we add an radio button to form using a class(doa)
Password need to encrypt while inserting into DB and need to decrypt while responding to forgot password
How can we destroy the cookie?
Password need to encrypt while inserting into DB and need to decrypt while responding to forgot password
how can I great two user and password in C++?
how can I great two user and password in C++?
to enter into a particular page only if the username,password and listbox value mtches
How to encrypt JavaScript?
validating username and password in servlet and redirect to login page with error message if not valid
AES Decryption using key password
jsp login code ... when username , drop down box and password is correct
Java Encryption using AES with key password
Using image in WML We can use the
Change root password of MYSQL using Java

Ads