note 11992 deleted from function.md5 by jimw
| From: | jimw@php.net | Date: | Sat, 03 Nov 2001 02:33:08 +0000 |
| Subject: | note 11992 deleted from function.md5 by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20334@lists.php.net to get a copy of this message | ||
How the R-MD5 above works:
This algorithm is basically a two-level XOR.
The encrypt function XORs the plaintext with a random number. This random number
is embedded in the output (to save it) by alterating its chars with the XOR output.
This is passed to keyED(), which XORs it with our text key.
Decryption is, of course, basically the reverse and works on the principal that
x XOR y XOR y = x.
Remember that not all ascii values will display in a browser, so the
$enc_text echo'd at bottom rarely shows $enc_text's entire value.
MD5 is used to unclump bits into a smooth pur'ee rather than for encryption.