note 31030 deleted from function.md5 by didou

From: Date: Wed, 16 Jul 2003 09:48:36 +0000
Subject: note 31030 deleted from function.md5 by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-52182@lists.php.net to get a copy of this message
Note Submitter: lee at fallingforward dot net ---- There is an extremely frusturating incompatibility between php and Perl's md5() and crypt() functions. I hope someone can prove me wrong on this, because I'm having trouble finding any writing on the internet about it, yet it seems like a big problem. Hexidecimal hashes generated with Perl's Digest::MD5 module WILL NOT equal hashes generated with php's md5() function if the input text contains any non-alphanumeric characters. Example: the correct password is "pa$$" $hash = md5($password); $phphash = md5('pa$$'); echo "plaintext password from user input: $password"; echo "hash from textfield: $hash"; echo "php original hash from text: $phphash"; echo "md5 hash from perl: " . $myrow['password']; outputs: plaintext password: pa$$ hash from textfield: 0aed5d740d7fab4201e885019a36eace php original hash from text: 0aed5d740d7fab4201e885019a36eace hash from perl: c18c9c57cb3658a50de06491a70b75cd

« previous php.notes (#52182) next »