private $extraSalt = "";
/**
- * Maximum length for salt
+ * Maximum length for random string
*/
- private $saltLength = 0;
+ private $rndStrLen = 0;
/**
* Private constructor
$this->extraSalt = sha1(getenv('SERVER_ADDR') . ":" . getenv('SERVER_SOFTWARE') . ":" . $this->getConfigInstance()->readConfig('date_key') . ":" . serialize($this->getDatabaseInstance()->getConnectionData()));
// Get config entry for max salt length
- $this->saltLength = $this->getConfigInstance()->readConfig('salt_length');
+ $this->rndStrLen = $this->getConfigInstance()->readConfig('rnd_str_length');
}
/**
*/
public function makeRandomString ($length = -1) {
// Is the number <1, then fix it to default length
- if ($length < 1) $length = $this->saltLength;
+ if ($length < 1) $length = $this->rndStrLen;
// Initialize the string
$randomString = "";
$cfg->setConfigEntry('date_key', date("d-m-Y (l-F-T)", time()));
// CFG: SALT-LENGTH
-$cfg->setConfigEntry('salt_length', 128);
+$cfg->setConfigEntry('salt_length', 10);
+
+// CFG: RND-STR-LENGTH
+$cfg->setConfigEntry('rnd_str_length', 128);
// [EOF]
?>