Bug #51255 [NEW]: crypt() example for SHA512 is wrong

From: Date: Wed, 10 Mar 2010 07:26:40 +0000
Subject: Bug #51255 [NEW]: crypt() example for SHA512 is wrong
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4027@lists.php.net to get a copy of this message
From: Operating system: Irrelevant PHP version: Irrelevant Package: Documentation problem Bug Type: Bug Bug description:crypt() example for SHA512 is wrong Description: ------------ crypt() example has copy&paste bug - salt used for SHA512 was copied from SHA256 and not changed to $6$, hence example script will generate SHA256 instead of SHA512. Expected result: ---------------- Standard DES: rl.3StKT.4T8M Extended DES: _J9..rasmBYk8r9AiWNc MD5: $1$rasmusle$rISCgZzpwk3UhDidwXvin0 Blowfish: $2a$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi SHA-256: $5$rounds=5000$usesomesillystri$KqJWpanXZHKq2BOB43TSaYhEWsQ1Lr5QNyPCDH/Tp.6 SHA-512: $6$rounds=5000$usesomesillystri$D4IrlXatmP7rx3P3InaxBeoomnAihCKRVQP22JZ6EY47Wc6Bk roIuUUBOov1i.S5KPgErtP/EN5mcO.ChWQW21 Actual result: -------------- Standard DES: rl.3StKT.4T8M Extended DES: _J9..rasmBYk8r9AiWNc MD5: $1$rasmusle$rISCgZzpwk3UhDidwXvin0 Blowfish: $2a$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi SHA-256: $5$rounds=5000$usesomesillystri$KqJWpanXZHKq2BOB43TSaYhEWsQ1Lr5QNyPCDH/Tp.6 SHA-512: $5$rounds=5000$usesomesillystri$KqJWpanXZHKq2BOB43TSaYhEWsQ1Lr5QNyPCDH/Tp.6 SHA-512: -- Edit bug report at http://bugs.php.net/bug.php?id=51255&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51255&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51255&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51255&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51255&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51255&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51255&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51255&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51255&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51255&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51255&r=support Expected behavior: http://bugs.php.net/fix.php?id=51255&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51255&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51255&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51255&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51255&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51255&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51255&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51255&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51255&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51255&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51255&r=mysqlcfg

« previous php.doc.bugs (#4027) next »