Various fixes to improve PHP 8.0 compatibility

- XmlParser 클래스가 PHP 내장 클래스가 되어버려서 XeXmlParser로 변경
- 함수나 파라미터의 형태가 맞지 않아서 치명적인 오류 나는 곳 수정
- undefined 변수 및 배열 키 다수 수정 (치명적인 오류는 아님)
- 계속 수정중...
This commit is contained in:
Kijin Sung 2020-10-31 00:25:26 +09:00
parent 90084efd75
commit 8c161bc28d
38 changed files with 136 additions and 100 deletions

View file

@ -8,85 +8,85 @@ class Password
Rhymix\Framework\Password::addAlgorithm($name, $regexp, $callback);
}
public function getSupportedAlgorithms()
public static function getSupportedAlgorithms()
{
return Rhymix\Framework\Password::getSupportedAlgorithms();
}
public function getBestAlgorithm()
public static function getBestAlgorithm()
{
return Rhymix\Framework\Password::getBestSupportedAlgorithm();
}
public function getCurrentlySelectedAlgorithm()
public static function getCurrentlySelectedAlgorithm()
{
return Rhymix\Framework\Password::getDefaultAlgorithm();
}
public function getWorkFactor()
public static function getWorkFactor()
{
return Rhymix\Framework\Password::getWorkFactor();
}
public function createHash($password, $algorithm = null)
public static function createHash($password, $algorithm = null)
{
return Rhymix\Framework\Password::hashPassword($password, $algorithm);
}
public function checkPassword($password, $hash, $algorithm = null)
public static function checkPassword($password, $hash, $algorithm = null)
{
return Rhymix\Framework\Password::checkPassword($password, $hash, $algorithm);
}
function checkAlgorithm($hash)
public static function checkAlgorithm($hash)
{
$algos = Rhymix\Framework\Password::checkAlgorithm($hash);
return count($algos) ? $algos[0] : false;
}
function checkWorkFactor($hash)
public static function checkWorkFactor($hash)
{
return Rhymix\Framework\Password::checkWorkFactor($hash);
}
public function createSecureSalt($length, $format = 'hex')
public static function createSecureSalt($length, $format = 'hex')
{
return Rhymix\Framework\Security::getRandom($length, $format);
}
public function createTemporaryPassword($length = 16)
public static function createTemporaryPassword($length = 16)
{
return Rhymix\Framework\Password::getRandomPassword($length);
}
public function createSignature($string)
public static function createSignature($string)
{
return Rhymix\Framework\Security::createSignature($string);
}
public function checkSignature($string, $signature)
public static function checkSignature($string, $signature)
{
return Rhymix\Framework\Security::verifySignature($string, $signature);
}
public function getSecretKey()
public static function getSecretKey()
{
return config('crypto.authentication_key');
}
public function pbkdf2($password, $salt, $algorithm = 'sha256', $iterations = 8192, $length = 24)
public static function pbkdf2($password, $salt, $algorithm = 'sha256', $iterations = 8192, $length = 24)
{
$hash = Rhymix\Framework\Security::pbkdf2($password, $salt, $algorithm, $iterations, $length);
$hash = explode(':', $hash);
return base64_decode($hash[3]);
}
public function bcrypt($password, $salt = null)
public static function bcrypt($password, $salt = null)
{
return Rhymix\Framework\Security::bcrypt($password, $salt);
}
function strcmpConstantTime($a, $b)
public static function strcmpConstantTime($a, $b)
{
return Rhymix\Framework\Security::compareStrings($a, $b);
}