ID: 38646 Updated by: [EMAIL PROTECTED] Reported By: edcross at gmail dot com -Status: Open +Status: Bogus Bug Type: *Encryption and hash functions Operating System: linux PHP Version: 5.1.5 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2006-08-30 01:13:55] edcross at gmail dot com Description: ------------ I am using Zendcore + PHP 5.1.4 with no extra addonds. When using the crypt function this way everything seems correct: echo crypt( 'password', '[EMAIL PROTECTED]&glevOudr0aK' ); (Using $1$ at the begining of the salt so it gives me back a MD5 result) The same function but this way (notice the " instead of ' around the salt): echo crypt( 'password', "[EMAIL PROTECTED]&glevOudr0aK" ); It gives me back a DES result. The only diference is how the salt is enclosed, duh!? Reproduce code: --------------- echo crypt( 'password', "[EMAIL PROTECTED]&glevOudr0aK" ); echo crypt( 'password', '[EMAIL PROTECTED]&glevOudr0aK' ); Expected result: ---------------- result1: $1$driak4Ug$AFGh.vpAzgjk4h9wVqs2a1 result2: $1$driak4Ug$AFGh.vpAzgjk4h9wVqs2a1 Actual result: -------------- result1: $1Oyx5r9mdGZ2 result2: $1$driak4Ug$AFGh.vpAzgjk4h9wVqs2a1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38646&edit=1
