]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/rng/class_RandomNumberGenerator.php
Continued:
[core.git] / framework / main / classes / rng / class_RandomNumberGenerator.php
index 94684346675e26833fb4975b4d5d33a79ba30ae3..91c40bb6968a2375ac00baac7d94b6027e9dc121 100644 (file)
@@ -12,7 +12,7 @@ use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2022 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -66,7 +66,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
         * @param       $className      Name of this class
         * @return      void
         */
-       protected function __construct () {
+       private function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
        }
@@ -122,7 +122,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
                if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('is_single_server') == 'Y') {
                        // Then use that IP for extra security
                        $serverIp = FrameworkBootstrap::detectServerAddress();
-               } // END - if
+               }
 
                // Yet-another fixed salt. This is not dependend on server software or date
                if ($extraInstance instanceof FrameworkInterface) {
@@ -159,7 +159,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
                // Is the number <1, then fix it to default length
                if ($length < 1) {
                        $length = $this->rndStrLen;
-               } // END - if
+               }
 
                // Initialize the string
                $randomString = '';
@@ -168,7 +168,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
                for ($idx = 0; $idx < $length; $idx++) {
                        // Add a random character and add it to our string
                        $randomString .= chr($this->randomNumber(0, 255));
-               } // END - for
+               }
 
                // Return the random string a little mixed up
                return str_shuffle($randomString);
@@ -216,7 +216,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
                // Get key
                if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('crypt_fixed_salt') == 'Y') {
                        $key = md5($this->getFixedSalt());
-               } // END - if
+               }
 
                // Return it
                return $key;