From: Tim Düsterhus Date: Thu, 28 Apr 2022 11:52:48 +0000 (+0200) Subject: Use `\hash('md5', …)` instead of `\md5()` in TPhpass X-Git-Tag: 5.5.0_Alpha_5~8^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3b73f079ef1a269a09eeb00cc7e3a1111926000d;p=GitHub%2FWoltLab%2FWCF.git Use `\hash('md5', …)` instead of `\md5()` in TPhpass This makes it easier to parameterize the implementation. --- diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/TPhpass.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/TPhpass.class.php index a816c16bf5..d7c7168235 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/TPhpass.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/TPhpass.class.php @@ -42,9 +42,9 @@ trait TPhpass return $output; } - $hash = \md5($salt . $password, true); + $hash = \hash('md5', $salt . $password, true); do { - $hash = \md5($hash . $password, true); + $hash = \hash('md5', $hash . $password, true); } while (--$count); $output = \mb_substr($settings, 0, 12, '8bit');