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
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 )
How can we solve this puzzle using java ?
ModuleNotFoundError: No module named 'phpy'
username and password in servlet
create webpage with table sql database using netbeans 6.8 with struts complete tutorial.(include username and password)
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?
create webpage with table sql database using netbeans 6.8 with struts complete tutorial.(include username and password) 0 Answer(s)
validating username and password from database
can any one give the frogort password code using jsp,
Java swing store the encrypted password into database
How to Display Username After Login in JSP
Java Read username, password and port from properties file
How we can integrate ASP .net website to payment gateway using SOAP xml request and response using wsdl.
What is the maximum size of a file that can be uploaded using PHP and how can we change this?
Create an HTML form login.html that accepts the username and password
How can I protect my database password ?
Password need to encrypt while inserting into DB and need to decrypt while responding to forgot password
Password need to encrypt while inserting into DB and need to decrypt while responding to forgot 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 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 many ways we can retrieve the date in result set of mysql using php?
How can we extract string 'roseindia.net ' from a string http://deepak@roseindia. net using regular expression of php?
How can we get the properties (size, type, width, height) of an image using php image functions?
to enter into a particular page only if the username,password and listbox value mtches
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)
how can I great two user and password in C++?
how can I great two user and password in C++?
validating username and password in servlet and redirect to login page with error message if not valid
AES Decryption using key password
How to encrypt JavaScript?
jsp login code ... when username , drop down box and password is correct
How can we destroy the cookie?
Java Encryption using AES with key password
Using image in WML We can use the
Java get windows Username

Ads