Bug #75221 [NEW]: Argon2i always throws NUL at the end

From: Date: Mon, 18 Sep 2017 09:40:54 +0000
Subject: Bug #75221 [NEW]: Argon2i always throws NUL at the end
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211203@lists.php.net to get a copy of this message
From: phpdoc at mail dot my1 dot info Operating system: Win8.1 x64 PHP version: 7.2.0RC2 Package: *Encryption and hash functions Bug Type: Bug Bug description:Argon2i always throws NUL at the end Description: ------------ for some reason using argon2i as a hash algorithm, it always dumps out a NUL byte at the end which doesnt happen with bcrypt. I just use the PHP7.2-RC2 x64-nts from windows.php.net on a webserver using cgi Test script: --------------- <?php header("Content-type: text/plain"); $pwhash=password_hash("php",PASSWORD_ARGON2I,[ 'memory_cost' => 16384, // 16 Mb 'time_cost' => 2, 'threads' => 4,]); echo $pwhash; $pwhash2=password_hash("php",PASSWORD_BCRYPT,[ "cost"=> 10]); echo PHP_EOL.PHP_EOL; echo $pwhash2; Expected result: ---------------- that it wont dump a NUL at the end Actual result: -------------- it does throw a NUL byte at the end. -- Edit bug report at https://bugs.php.net/bug.php?id=75221&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75221&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75221&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75221&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75221&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75221&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75221&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75221&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75221&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75221&r=support Expected behavior: https://bugs.php.net/fix.php?id=75221&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75221&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75221&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75221&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75221&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75221&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75221&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75221&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75221&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75221&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75221&r=mysqlcfg

« previous php.bugs (#211203) next »