]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/crypto/class_CryptoHelper.php
readConfig() is not naming convention, renamed to getConfigEntry()
[core.git] / inc / classes / main / crypto / class_CryptoHelper.php
index ed0c1795105e9f19930cffd4a9fdf37b3a8d32e2..34480b49343afd8e52472a48688a13b5a59c074b 100644 (file)
@@ -115,7 +115,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable {
                $randomString = $this->rngInstance->randomString();
 
                // Get config entry for salt length
-               $length = $this->getConfigInstance()->readConfig('salt_length');
+               $length = $this->getConfigInstance()->getConfigEntry('salt_length');
 
                // Keep only defined number of characters
                $this->salt = substr(sha1($randomString), -$length, $length);
@@ -141,7 +141,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable {
                // Is the old password set?
                if (!empty($oldHash)) {
                        // Use the salt from hash, first get length
-                       $length = $this->getConfigInstance()->readConfig('salt_length');
+                       $length = $this->getConfigInstance()->getConfigEntry('salt_length');
 
                        // Then extract the X first characters from the hash as our salt
                        $salt = substr($oldHash, 0, $length);
@@ -149,7 +149,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable {
 
                // Hash the password with salt
                //* DEBUG: */ echo "salt=".$salt."/plain=".$str."<br />\n";
-               $hashed = $salt . md5(sprintf($this->getConfigInstance()->readConfig('hash_mask'),
+               $hashed = $salt . md5(sprintf($this->getConfigInstance()->getConfigEntry('hash_mask'),
                        $salt,
                        $this->rngInstance->getFixedSalt(),
                        $str
@@ -171,7 +171,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable {
                $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
 
                // Get key
-               if ($this->getConfigInstance()->readConfig('crypt_fixed_salt') == 'Y') {
+               if ($this->getConfigInstance()->getConfigEntry('crypt_fixed_salt') == 'Y') {
                        $key = md5($this->rngInstance->getFixedSalt());
                } else {
                        $key = md5($this->rngInstance->getExtraSalt());
@@ -235,7 +235,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable {
                $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
 
                // Get key
-               if ($this->getConfigInstance()->readConfig('crypt_fixed_salt') == 'Y') {
+               if ($this->getConfigInstance()->getConfigEntry('crypt_fixed_salt') == 'Y') {
                        $key = md5($this->rngInstance->getFixedSalt());
                } else {
                        $key = md5($this->rngInstance->getExtraSalt());