Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/utility/formatters/password_formatter.php
Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Line(s) | |||||
return $password; | return $password; | ||||
break; | break; | ||||
case PasswordHashingMethod::MD5: | case PasswordHashingMethod::MD5: | ||||
return $this->_md5hash($password, $salt, false); | return $this->_md5hash($password, $salt, false); | ||||
break; | break; | ||||
case PasswordHashingMethod::MD5_AND_PHPPASS: | case PasswordHashingMethod::MD5_AND_PHPPASS: | ||||
return $this->_phpPass->hashPassword($this->_md5hash($password, $salt, true)); | $password_hashed = preg_match('/^[a-f0-9]{32}$/', $password); | ||||
return $this->_phpPass->hashPassword($this->_md5hash($password, $salt, $password_hashed)); | |||||
break; | break; | ||||
case PasswordHashingMethod::PHPPASS: | case PasswordHashingMethod::PHPPASS: | ||||
return $this->_phpPass->hashPassword($password); | return $this->_phpPass->hashPassword($password); | ||||
break; | break; | ||||
default: | default: | ||||
throw new InvalidArgumentException('Unknown password hashing method "' . $hashing_method . '"'); | throw new InvalidArgumentException('Unknown password hashing method "' . $hashing_method . '"'); | ||||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |