aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/crypto/manager.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-06-27 14:28:06 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-09-14 13:53:58 +0200
commitdc76146cefd6fd26f2325bb86b17e1266bc2ccc0 (patch)
tree9d363aaf23307b8330853006971cd8be4fa97d45 /phpBB/includes/crypto/manager.php
parentc67f7dba60631c9e1d0f58a32e866c783fe7216b (diff)
downloadforums-dc76146cefd6fd26f2325bb86b17e1266bc2ccc0.tar
forums-dc76146cefd6fd26f2325bb86b17e1266bc2ccc0.tar.gz
forums-dc76146cefd6fd26f2325bb86b17e1266bc2ccc0.tar.bz2
forums-dc76146cefd6fd26f2325bb86b17e1266bc2ccc0.tar.xz
forums-dc76146cefd6fd26f2325bb86b17e1266bc2ccc0.zip
[feature/passwords] Add combined hashing method to helper
This will allow to hash a previously hashed password with another hashing method, i.e. as upgrade path from phpBB 3.0 to 3.1. PHPBB3-11610
Diffstat (limited to 'phpBB/includes/crypto/manager.php')
-rw-r--r--phpBB/includes/crypto/manager.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/includes/crypto/manager.php b/phpBB/includes/crypto/manager.php
index 6f1aed25be..bbb844adab 100644
--- a/phpBB/includes/crypto/manager.php
+++ b/phpBB/includes/crypto/manager.php
@@ -163,6 +163,11 @@ class phpbb_crypto_manager
{
$type = ($type === '') ? $this->type : $type;
+ if (is_array($type))
+ {
+ return $this->helper->combined_hash_password($password, $type);
+ }
+
$hashing_algorithm = $this->container->get($type);
// Do not support 8-bit characters with $2a$ bcrypt
if ($type === 'crypto.driver.bcrypt' || ($type === 'crypto.driver.bcrypt_2y' && !$hashing_algorithm->is_supported()))