aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/passwords/driver/rehashable_driver_interface.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2016-12-03 14:07:56 +0100
committerTristan Darricau <github@nicofuma.fr>2016-12-03 14:07:56 +0100
commit487df8befc9477c742b2794593c2ddb290c1c678 (patch)
tree7e04e7c2a5bcdcc1a7e19327669ec5ec52a57e88 /phpBB/phpbb/passwords/driver/rehashable_driver_interface.php
parent48db9cbcf035001a9a39e88973d297104e89bbcb (diff)
parent380be9f1fd713dbcee91f12f18060d6b3ff4819e (diff)
downloadforums-487df8befc9477c742b2794593c2ddb290c1c678.tar
forums-487df8befc9477c742b2794593c2ddb290c1c678.tar.gz
forums-487df8befc9477c742b2794593c2ddb290c1c678.tar.bz2
forums-487df8befc9477c742b2794593c2ddb290c1c678.tar.xz
forums-487df8befc9477c742b2794593c2ddb290c1c678.zip
Merge pull request #4405 from marc1706/ticket/14733
[ticket/14733] Support increasing hashing cost factor * marc1706/ticket/14733: [ticket/14733] Make sure detect_algorithm() works correctly and add tests [ticket/14733] Extend passwords driver_interface in rehashable_driver_interface [ticket/14733] Use new interface to preserve backwards compatibility [ticket/14733] Use default cost factor in bcrypt constructor [ticket/14733] Support increasing hashing cost factor
Diffstat (limited to 'phpBB/phpbb/passwords/driver/rehashable_driver_interface.php')
-rw-r--r--phpBB/phpbb/passwords/driver/rehashable_driver_interface.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/phpBB/phpbb/passwords/driver/rehashable_driver_interface.php b/phpBB/phpbb/passwords/driver/rehashable_driver_interface.php
new file mode 100644
index 0000000000..ca30748502
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/rehashable_driver_interface.php
@@ -0,0 +1,25 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\passwords\driver;
+
+interface rehashable_driver_interface extends driver_interface
+{
+ /**
+ * Check if password needs to be rehashed
+ *
+ * @param string $hash Hash to check for rehash
+ * @return bool True if password needs to be rehashed, false if not
+ */
+ public function needs_rehash($hash);
+}