Jump to content

decrypt password


patelp7

Recommended Posts

Hello.

 

I encryt a password and put it in a table.

 

How would i retrieve the password in a decrypted format?

 

$Encryptedpassword = crypt($Password, "ND");
	$query = "insert into adminmember (Username, Password, First_Name, Last_Name, EmailAdd , User_Level) Values ('$Username', '$Encryptedpassword', '$Firstname', '$Lastname', '$Emailadd', '$Userlevel')";

Thats how mi encrypt it when inserting....any ideas on retrieving?

Cheers

Link to comment
https://forums.phpfreaks.com/topic/48240-decrypt-password/
Share on other sites

Hmmm.. im not very good at PHP so im not really sure...

 

If i were to do this id just fetch the password from the database, even if its something like "dfkjb45kjbfokjn45t08hi"

Then to login, compare the password they type in with this one.

 

You have to encrypt the password they type in aswell in order for the validation to work, else you would be validating thier password that could be "apple" to an encrypted apple lol, which could be sopmething like tha above.

 

Even if their changing the password you dont need to know what it was in the first place. 

Link to comment
https://forums.phpfreaks.com/topic/48240-decrypt-password/#findComment-235815
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.