X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Futils%2FMWCryptRand.php;h=673586d35d0172b91cde30234e2bacaf49b64723;hb=748c5eae2fd5d897c94c48771161c259941a7488;hp=ec8bf5cf21b0f64950d244e211d8f10300fd9f5e;hpb=7ddab17aac1103fa080b50759ab6ca906caa554e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/utils/MWCryptRand.php b/includes/utils/MWCryptRand.php index ec8bf5cf21..673586d35d 100644 --- a/includes/utils/MWCryptRand.php +++ b/includes/utils/MWCryptRand.php @@ -24,45 +24,7 @@ * @file */ -use MediaWiki\MediaWikiServices; - class MWCryptRand { - /** - * @deprecated since 1.32 - * @return CryptRand - */ - protected static function singleton() { - wfDeprecated( __METHOD__, '1.32' ); - return MediaWikiServices::getInstance()->getCryptRand(); - } - - /** - * Return a boolean indicating whether or not the source used for cryptographic - * random bytes generation in the previously run generate* call - * was cryptographically strong. - * - * @deprecated since 1.32, always returns true - * - * @return bool Always true - */ - public static function wasStrong() { - wfDeprecated( __METHOD__, '1.32' ); - return true; - } - - /** - * Generate a run of cryptographically random data and return - * it in raw binary form. - * - * @deprecated since 1.32, use random_bytes() - * - * @param int $bytes The number of bytes of random data to generate - * @return string Raw binary random data - */ - public static function generate( $bytes ) { - wfDeprecated( __METHOD__, '1.32' ); - return random_bytes( floor( $bytes ) ); - } /** * Generate a run of cryptographically random data and return