Re: MD5 usage
| From: | Marco Tabini | Date: | Tue, 22 Oct 2002 21:32:43 +0000 |
| Subject: | Re: MD5 usage | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120987@lists.php.net to get a copy of this message | ||
md5 uses a "one-way" encryption algorithm, and therefore you can't
"decrypt" the resulting string.
md5 is a digest function, so it's usually employed to check that a
message has not been altered. For example, you can check a password by
(a) getting the original, md5()'ing it and storing into a database
(b) when you must check a password, you md5() what the use provides you
and check it against the database. This way, even if somebody manages to
steal information from the database, they can't learn your passwords.
On Tue, 2002-10-22 at 17:37, Francisco Vaucher wrote:
> Hi to all,
>
> I'm using
>
> $string = 'test';
> md5($string);
>
> to crypt $string. I get the hash output and works fine.
>
> Now, how do I retrieve and check that info? is there a decrypt method ?
>
> if my concern is not well explained pls tell me...
>
> regards,
>
> f.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>