From: Tim Düsterhus Date: Fri, 5 Aug 2022 07:30:52 +0000 (+0200) Subject: Remove deprecated methods from CryptoUtil X-Git-Tag: 6.0.0_Alpha_1~1076^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c2b27d2656f82a53667a7ca8ba50be31e6999d5;p=GitHub%2FWoltLab%2FWCF.git Remove deprecated methods from CryptoUtil These are trivially replaced by their native counterparts. --- diff --git a/wcfsetup/install/files/lib/util/CryptoUtil.class.php b/wcfsetup/install/files/lib/util/CryptoUtil.class.php index 43d8e58465..2c82d1f375 100644 --- a/wcfsetup/install/files/lib/util/CryptoUtil.class.php +++ b/wcfsetup/install/files/lib/util/CryptoUtil.class.php @@ -89,39 +89,6 @@ final class CryptoUtil } } - /** - * @deprecated Use \hash_equals() directly. - */ - public static function secureCompare($hash1, $hash2) - { - $hash1 = (string)$hash1; - $hash2 = (string)$hash2; - - return \hash_equals($hash1, $hash2); - } - - /** - * @deprecated Use \random_bytes() directly. - */ - public static function randomBytes($n) - { - return \random_bytes($n); - } - - /** - * @deprecated Use \random_int() directly. - */ - public static function randomInt($min, $max) - { - $range = $max - $min; - if ($range == 0) { - // not random - throw new CryptoException("Cannot generate a secure random number, min and max are the same"); - } - - return \random_int($min, $max); - } - /** * Forbid creation of CryptoUtil objects. */