note 22100 deleted from function.md5 by jimw
| From: | jimw@php.net | Date: | Sat, 08 Feb 2003 19:49:14 +0000 |
| Subject: | note 22100 deleted from function.md5 by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-43638@lists.php.net to get a copy of this message | ||
willmoss@btinternet.com, saying there are no decryption functions for md5 in php is a bit of a
misnomer. md5 is a hash, not an encryption algorithm. The difference between the two is that
encryption is meant to be undone, so any algorithm must both preserve all of the input data and also
use functions which are reversible. Hashes are not meant to be undone, so they purposely throw out
data or use transforms which cannot be undone. A good example of a trivial hash is modular
arithmetic, where 100 mod 7 = 2, given 2 it is impossible to calculate 100 without guessing. PHP
does not include an UN-md5 because such a thing cannot exist for long strings, and hopefully never
will for short ones (less than 16 or so characters).