X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Futils%2FMWCryptRand.php;h=673586d35d0172b91cde30234e2bacaf49b64723;hb=166389272390f58ea04886d561831aff35303078;hp=0fc45f7e111e989d06a9f201606179c798b067ea;hpb=85724779efcb5e70bf6c6f8867fa4d6dc957c566;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/utils/MWCryptRand.php b/includes/utils/MWCryptRand.php index 0fc45f7e11..673586d35d 100644 --- a/includes/utils/MWCryptRand.php +++ b/includes/utils/MWCryptRand.php @@ -24,42 +24,7 @@ * @file */ -use MediaWiki\MediaWikiServices; - class MWCryptRand { - /** - * @deprecated since 1.32 - * @return CryptRand - */ - protected static function singleton() { - 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() { - 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 ) { - return random_bytes( floor( $bytes ) ); - } /** * Generate a run of cryptographically random data and return