|
static | generate ( $bytes) |
| Generate a run of cryptographically random data and return it in raw binary form. More...
|
|
static | generateHex ( $chars) |
| Generate a run of cryptographically random data and return it in hexadecimal string format. More...
|
|
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. More...
|
|
Definition at line 29 of file MWCryptRand.php.
◆ generate()
static MWCryptRand::generate |
( |
|
$bytes | ) |
|
|
static |
Generate a run of cryptographically random data and return it in raw binary form.
- Deprecated:
- since 1.32, use random_bytes()
- Parameters
-
int | $bytes | The number of bytes of random data to generate |
- Returns
- string Raw binary random data
Definition at line 60 of file MWCryptRand.php.
◆ generateHex()
static MWCryptRand::generateHex |
( |
|
$chars | ) |
|
|
static |
Generate a run of cryptographically random data and return it in hexadecimal string format.
- Parameters
-
int | $chars | The number of hex chars of random data to generate |
- Returns
- string Hexadecimal random data
Definition at line 71 of file MWCryptRand.php.
Referenced by UIDGenerator\__construct(), SpecialPage\checkLoginSecurityLevel(), User\confirmationToken(), MWSaltedPassword\crypt(), Installer\doGenerateKeys(), CryptRand\generateHex(), PasswordFactory\generateRandomPasswordString(), MediaWiki\Session\SessionManager\generateSessionId(), WikiEditorHooks\getEditingStatsId(), Pingback\getOrCreatePingbackId(), MediaWiki\Session\Session\getSecretKeys(), MediaWiki\Session\Session\getToken(), 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().
◆ singleton()
static MWCryptRand::singleton |
( |
| ) |
|
|
staticprotected |
◆ wasStrong()
static MWCryptRand::wasStrong |
( |
| ) |
|
|
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.
- Deprecated:
- since 1.32, always returns true
- Returns
- bool Always true
Definition at line 47 of file MWCryptRand.php.
The documentation for this class was generated from the following file: