// Do we have a single server?
if ($this->getConfigInstance()->getConfigEntry('is_single_server') == 'Y') {
// Then use that IP for extra security
- $serverIp = $this->getConfigInstance()->getServerAddress();
+ $serverIp = $this->getConfigInstance()->detectServerAddress();
} // END - if
// Yet-another fixed salt. This is not dependend on server software or date
public final function getFixedSalt () {
return $this->fixedSalt;
}
+
+ /**
+ * Generates a key based on if we have extra (default) or fixed salt enabled
+ *
+ * @return $key The generated key for encrypion
+ */
+ public function generateKey () {
+ // Default is extra salt
+ $key = md5($this->getExtraSalt());
+
+ // Get key
+ if ($this->getConfigInstance()->getConfigEntry('crypt_fixed_salt') == 'Y') {
+ $key = md5($this->getFixedSalt());
+ } // END - if
+
+ // Return it
+ return $key;
+ }
}
// [EOF]