$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
// Get key
- $key = md5($this->rngInstance->getFixedSalt());
+ if ($this->getConfigInstance()->readConfig('crypt_fixed_salt') == "Y") {
+ $key = md5($this->rngInstance->getFixedSalt());
+ } else {
+ $key = md5($this->rngInstance->getExtraSalt());
+ }
// Encrypt the string
$encrypted = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $str, MCRYPT_MODE_ECB, $iv);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
// Get key
- $key = md5($this->rngInstance->getFixedSalt());
+ if ($this->getConfigInstance()->readConfig('crypt_fixed_salt') == "Y") {
+ $key = md5($this->rngInstance->getFixedSalt());
+ } else {
+ $key = md5($this->rngInstance->getExtraSalt());
+ }
// Encrypt the string
$str = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $encrypted, MCRYPT_MODE_ECB, $iv);