How to display in a decrypted format? - Pleas help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
azri_bech
Forum Newbie
Posts: 14
Joined: Fri Aug 07, 2009 11:15 pm

How to display in a decrypted format? - Pleas help

Post by azri_bech »

I encrypt a password and put it in a table. How would i retrieve the password in a decrypted format?

please help
Thank you
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: How to display in a decrypted format? - Pleas help

Post by papa »

The idea is that you don't decrypt the password, instead you match to encrypted string against each other and see if they match.
azri_bech
Forum Newbie
Posts: 14
Joined: Fri Aug 07, 2009 11:15 pm

Re: How to display in a decrypted format? - Pleas help

Post by azri_bech »

how?
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: How to display in a decrypted format? - Pleas help

Post by Mark Baker »

azri_bech wrote:how?
By encrypting the value that the user has entered in the password field in the same way that you encrypted the original password stored in the table
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: How to display in a decrypted format? - Pleas help

Post by jackpf »

Well, no, if you encrypted the password, you can just decrypt it using the decryption algorithm of whatever algorithm you used to encrypt it.

However, if you hashed it, then you can't retrieve the original value (without hacking it, or rainbow tables).
Post Reply