Re: crypt problem??
| From: | Ignacio Vazquez-Abrams | Date: | Fri, 01 Dec 2000 15:27:01 +0000 |
| Subject: | Re: crypt problem?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28213@lists.php.net to get a copy of this message | ||
On Fri, 1 Dec 2000 kapil@archeanit.com wrote:
> Hi All,
>
> How do i decrypt my password using php/mysql? i have used crypt function to
> encrypt my password. right now i am working on a module of forgot password
> where in once the user enters correct answer for the hint question he had
> provided while opening his email account.if the answer he enters is correct
> ,i have to send him his original password to the alternate email he has
> provided in his personal deatils while opening his account.but then, iam
> getting an encrypted value of the password.help will be greatly appreciated.
>
> TIA
>
> Kapil
>
> Web Programmer
> Archean Infotech Limited
> India
>
You can't decrypt something that's been hashed with crypt. Two suggestions
however:
1) Use md5() instead of crypt(). It's harder to break.
2) Send a new password instead. This will allow you to use hash functions like
crypt() and md5().
--
Ignacio Vazquez-Abrams <ignacio@openservices.net>