MediaWiki REL1_33
|
Static Public Member Functions | |
static | generate ( $bytes) |
Generate a run of cryptographically random data and return it in raw binary form. | |
static | generateHex ( $chars) |
Generate a run of cryptographically random data and return it in hexadecimal string format. | |
static | wasStrong () |
Return a boolean indicating whether or not the source used for cryptographic random bytes generation in the previously run generate* call was cryptographically strong. | |
Static Protected Member Functions | |
static | singleton () |
Definition at line 29 of file MWCryptRand.php.
|
static |
Generate a run of cryptographically random data and return it in raw binary form.
int | $bytes | The number of bytes of random data to generate |
Definition at line 62 of file MWCryptRand.php.
References and(), and wfDeprecated().
|
static |
Generate a run of cryptographically random data and return it in hexadecimal string format.
int | $chars | The number of hex chars of random data to generate |
Definition at line 74 of file MWCryptRand.php.
References and().
Referenced by UIDGenerator\__construct(), SpecialPage\checkLoginSecurityLevel(), User\confirmationToken(), MWSaltedPassword\crypt(), Installer\doGenerateKeys(), CryptRand\generateHex(), PasswordFactory\generateRandomPasswordString(), MediaWiki\Session\SessionManager\generateSessionId(), WikiEditorHooks\getEditingStatsId(), Pingback\getOrCreatePingbackId(), User\getToken(), AuthManagerSpecialPage\handleReauthBeforeExecute(), UIDGenerator\newUUIDv4(), User\resetTokenFromOption(), BotPassword\save(), User\setToken(), ApiRevisionDeleteTest\setUp(), UserTest\testAutoblockCookieInauthentic(), UserTest\testAutoblockCookieInfiniteExpiry(), UserTest\testAutoblockCookies(), UserTest\testAutoblockCookiesDisabled(), UserTest\testIpBlockCookieIgnoredWhenUserLoggedIn(), UserTest\testIpBlockCookieNotSet(), and UserTest\testIpBlockCookieSet().
|
staticprotected |
Definition at line 34 of file MWCryptRand.php.
References wfDeprecated().
|
static |
Return a boolean indicating whether or not the source used for cryptographic random bytes generation in the previously run generate* call was cryptographically strong.
Definition at line 48 of file MWCryptRand.php.
References wfDeprecated().