]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/rng/class_RandomNumberGenerator.php
Added missing class
[core.git] / inc / classes / main / rng / class_RandomNumberGenerator.php
index ec44b9025698e713e04fa770d6afec41fecce647..a30fb0ddd4750cf6e89d8a008fa92db30b1573fb 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -122,11 +122,11 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
                        $this->fixedSalt = sha1(
                                $serverIp . ':' .
                                $extraInstance->__toString() . ':' .
-                               serialize($this->getDatabaseInstance()->getConnectionData())
+                               json_encode($this->getDatabaseInstance()->getConnectionData())
                        );
                } else {
                        // Without extra information
-                       $this->fixedSalt = sha1($serverIp . ':' . serialize($this->getDatabaseInstance()->getConnectionData()));
+                       $this->fixedSalt = sha1($serverIp . ':' . json_encode($this->getDatabaseInstance()->getConnectionData()));
                }
 
                // One-way data we need for "extra-salting" the random number