diff options
author | Sara Golemon <pollita@php.net> | 2018-10-15 14:58:34 -0400 |
---|---|---|
committer | Sara Golemon <pollita@php.net> | 2018-11-20 17:26:55 -0500 |
commit | 534df87c9e3c28001986e70844e0ad04e5708d3d (patch) | |
tree | 0d0175681d4c00ca3493e9cda3711544ab324da5 /ext/standard/tests/password/password_needs_rehash.phpt | |
parent | f4faa69b575bd70aa6877d7c295834f5be1f133c (diff) | |
download | php-git-534df87c9e3c28001986e70844e0ad04e5708d3d.tar.gz |
Implement password mechanism registry
RFC: https://wiki.php.net/rfc/password_registry
Diffstat (limited to 'ext/standard/tests/password/password_needs_rehash.phpt')
-rw-r--r-- | ext/standard/tests/password/password_needs_rehash.phpt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/standard/tests/password/password_needs_rehash.phpt b/ext/standard/tests/password/password_needs_rehash.phpt index 8efd0add8f..688d57ed32 100644 --- a/ext/standard/tests/password/password_needs_rehash.phpt +++ b/ext/standard/tests/password/password_needs_rehash.phpt @@ -6,9 +6,13 @@ Test normal operation of password_needs_rehash() // Invalid Hash, always rehash var_dump(password_needs_rehash('', PASSWORD_BCRYPT)); +var_dump(password_needs_rehash('', 1)); +var_dump(password_needs_rehash('', '2y')); // Valid, as it's an unknown algorithm +var_dump(password_needs_rehash('', PASSWORD_DEFAULT)); var_dump(password_needs_rehash('', 0)); +var_dump(password_needs_rehash('', NULL)); // Valid with cost the same var_dump(password_needs_rehash('$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y', PASSWORD_BCRYPT, array('cost' => 10))); @@ -35,6 +39,10 @@ echo "OK!"; ?> --EXPECT-- bool(true) +bool(true) +bool(true) +bool(false) +bool(false) bool(false) bool(false) bool(false) |