MediaWiki master
MediaWiki\Utils\MWCryptRand Class Reference

A cryptographic random generator class used for generating secret keys. More...

Static Public Member Functions

static generateHex ( $chars)
 Generate a run of cryptographically random data and return it in hexadecimal string format.
 

Detailed Description

A cryptographic random generator class used for generating secret keys.

This is based in part on Drupal code as well as what we used in our own code prior to introduction of this class.

Definition at line 15 of file MWCryptRand.php.

Member Function Documentation

◆ generateHex()

static MediaWiki\Utils\MWCryptRand::generateHex ( $chars)
static

Generate a run of cryptographically random data and return it in hexadecimal string format.

Parameters
int$charsThe number of hex chars of random data to generate
Returns
string Hexadecimal random data

Definition at line 24 of file MWCryptRand.php.


The documentation for this class was generated from the following file: