$randomString = $this->rngInstance->randomString();
// Get config entry for salt length
- $length = $this->getConfigInstance()->readConfig('salt_length');
+ $length = $this->getConfigInstance()->getConfigEntry('salt_length');
// Keep only defined number of characters
$this->salt = substr(sha1($randomString), -$length, $length);
// Is the old password set?
if (!empty($oldHash)) {
// Use the salt from hash, first get length
- $length = $this->getConfigInstance()->readConfig('salt_length');
+ $length = $this->getConfigInstance()->getConfigEntry('salt_length');
// Then extract the X first characters from the hash as our salt
$salt = substr($oldHash, 0, $length);
// Hash the password with salt
//* DEBUG: */ echo "salt=".$salt."/plain=".$str."<br />\n";
- $hashed = $salt . md5(sprintf($this->getConfigInstance()->readConfig('hash_mask'),
+ $hashed = $salt . md5(sprintf($this->getConfigInstance()->getConfigEntry('hash_mask'),
$salt,
$this->rngInstance->getFixedSalt(),
$str
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
// Get key
- if ($this->getConfigInstance()->readConfig('crypt_fixed_salt') == 'Y') {
+ if ($this->getConfigInstance()->getConfigEntry('crypt_fixed_salt') == 'Y') {
$key = md5($this->rngInstance->getFixedSalt());
} else {
$key = md5($this->rngInstance->getExtraSalt());
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
// Get key
- if ($this->getConfigInstance()->readConfig('crypt_fixed_salt') == 'Y') {
+ if ($this->getConfigInstance()->getConfigEntry('crypt_fixed_salt') == 'Y') {
$key = md5($this->rngInstance->getFixedSalt());
} else {
$key = md5($this->rngInstance->getExtraSalt());