Bug #76360 [Opn->Fbk]: PASSWORD_ARGON2I is an undefined constant
| From: | requinix@php.net | Date: | Mon, 21 May 2018 02:22:56 +0000 |
| Subject: | Bug #76360 [Opn->Fbk]: PASSWORD_ARGON2I is an undefined constant | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215313@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76360&edit=1
ID: 76360
Updated by: requinix@php.net
Reported by: jr at geeshoe dot com
Summary: PASSWORD_ARGON2I is an undefined constant
-Status: Open
+Status: Feedback
Type: Bug
Package: *Encryption and hash functions
Operating System: Debian 9
PHP Version: 7.2.5
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2018-05-20 23:52:22] Danack at basereality dot com
PASSWORD_ARGON2I will only be available if PHP was compiled against the Argon 2 library.
How did you install PHP? If it's from someone's repo, you might need to ask them to
include it.
------------------------------------------------------------------------
[2018-05-20 23:13:25] jr at geeshoe dot com
Description:
------------
When attempting to use password_hash with PASSWORD_ARGON2I as the algo, PHP throws 2 warnings.
1 - Undefined constant PASSWORD_ARGON2I
2 - password_hash() expects parameter 2 to be integer, string given.
Test script:
---------------
<?php
echo phpversion();
echo password_hash('password', PASSWORD_ARGON2I);
Expected result:
----------------
7.2.5
...some hash....
Actual result:
--------------
/usr/local/bin/php /-REDACTED-/test.php
7.2.5
Warning: Use of undefined constant PASSWORD_ARGON2I - assumed 'PASSWORD_ARGON2I' (this
will throw an Error in a future version of PHP) in /-REDACTED-/test.php on line 3
PHP Warning: Use of undefined constant PASSWORD_ARGON2I - assumed 'PASSWORD_ARGON2I'
(this will throw an Error in a future version of PHP) in /-REDACTED-/test.php on line 3
Call Stack:
PHP Stack trace:
0.0001 387040 1. {main}() /-REDACTED-/test.php:0
PHP 1. {main}() /-REDACTED-/test.php:0
PHP Warning: password_hash() expects parameter 2 to be integer, string given in
/-REDACTED-/test.php on line 3
PHP Stack trace:
Warning: password_hash() expects parameter 2 to be integer, string given in /-REDACTED-/test.php on
line 3
PHP 1. {main}() /-REDACTED-/test.php:0
PHP 2. password_hash() /-REDACTED-/test.php:3
Call Stack:
0.0001 387040 1. {main}() /-REDACTED-/test.php:0
0.0001 387072 2. password_hash() /-REDACTED-/test.php:3
Process finished with exit code 0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76360&edit=1