Re: Crypting Passwords for storage.
| From: | Justin French | Date: | Sat, 15 Mar 2003 08:18:14 +0000 |
| Subject: | Re: Crypting Passwords for storage. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139788@lists.php.net to get a copy of this message | ||
Commonly, you don't need to encrypt it.
just md5() the password before inserting it, so you only store the md5'd
password.
then, to check on login, md5() the password they enter into a form... if
they match, then they are the same.
heaps less code, no need to mycrypt libraries to be installed, etc etc.
the only catch is that if the user forgets the password, you need to reset
it, because md5 is one-way, and isn't technically encryption :)
justin
on 14/03/03 1:31 PM, Philip J. Newman (newmanpj@philipnz.com) wrote:
> I have a user admin for a site, how ever passwords are stored in plane text.
> Is there away to crypt and then read the crypt when verifying that string vs
> the plane text in the password box?
>
> ------
> Philip J. Newman.
> Head Developer
> info@philipnz.com
>
>