aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/config/crypto.yml8
-rw-r--r--phpBB/phpbb/crypto/driver/base.php21
-rw-r--r--phpBB/phpbb/crypto/driver/interface.php7
3 files changed, 36 insertions, 0 deletions
diff --git a/phpBB/config/crypto.yml b/phpBB/config/crypto.yml
index 03a7cdce2e..072995a8a8 100644
--- a/phpBB/config/crypto.yml
+++ b/phpBB/config/crypto.yml
@@ -3,6 +3,8 @@ services:
class: phpbb_crypto_driver_bcrypt
arguments:
- @config
+ calls:
+ - [set_name, [crypto.driver.bcrypt]]
tags:
- { name: crypto.driver }
@@ -10,6 +12,8 @@ services:
class: phpbb_crypto_driver_bcrypt_2y
arguments:
- @config
+ calls:
+ - [set_name, [crypto.driver.bcrypt_2y]]
tags:
- { name: crypto.driver }
@@ -17,6 +21,8 @@ services:
class: phpbb_crypto_driver_salted_md5
arguments:
- @config
+ calls:
+ - [set_name, [crypto.driver.salted_md5]]
tags:
- { name: crypto.driver }
@@ -24,6 +30,8 @@ services:
class: phpbb_crypto_driver_phpass
arguments:
- @config
+ calls:
+ - [set_name, [crypto.driver.phpass]]
tags:
- { name: crypto.driver }
diff --git a/phpBB/phpbb/crypto/driver/base.php b/phpBB/phpbb/crypto/driver/base.php
index c134122174..f75031dabd 100644
--- a/phpBB/phpbb/crypto/driver/base.php
+++ b/phpBB/phpbb/crypto/driver/base.php
@@ -26,6 +26,9 @@ abstract class phpbb_crypto_driver_base implements phpbb_crypto_driver_interface
/** @var phpbb_crypto_driver_helper */
protected $helper;
+ /** @var driver name */
+ protected $name;
+
/**
* Constructor of crypto driver object
*
@@ -44,4 +47,22 @@ abstract class phpbb_crypto_driver_base implements phpbb_crypto_driver_interface
{
return true;
}
+
+ /**
+ * @inheritdoc
+ */
+ public function get_name()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Set driver name
+ *
+ * @param string $name Driver name
+ */
+ public function set_name($name)
+ {
+ $this->name = $name;
+ }
}
diff --git a/phpBB/phpbb/crypto/driver/interface.php b/phpBB/phpbb/crypto/driver/interface.php
index 9686aa33de..68313fbedd 100644
--- a/phpBB/phpbb/crypto/driver/interface.php
+++ b/phpBB/phpbb/crypto/driver/interface.php
@@ -65,4 +65,11 @@ interface phpbb_crypto_driver_interface
* @return string String containing the hash settings
*/
public function get_settings_only($hash, $full = false);
+
+ /**
+ * Get the driver name
+ *
+ * @return string Driver name
+ */
+ public function get_name();
}