XOOPS  2.6.0
Xoops\Core\Random Class Reference

Static Public Member Functions

static generateKey ($hash= 'sha512', $bytes=128)
 
static generateOneTimeToken ($hash= 'sha512', $bytes=64)
 

Detailed Description

Definition at line 28 of file Random.php.

Member Function Documentation

static Xoops\Core\Random::generateKey (   $hash = 'sha512',
  $bytes = 128 
)
static

Create a medium strength key

Generates a medium strength random number of size $bytes and hash with the algorithm specified in $hash.

Parameters
string$hashhash function to use
integer$bytesthe number of random bytes to generate
Returns
string hashed token

Definition at line 60 of file Random.php.

Referenced by Xoops\Core\Session\RememberMe\getNewSeries().

Here is the caller graph for this function:

static Xoops\Core\Random::generateOneTimeToken (   $hash = 'sha512',
  $bytes = 64 
)
static

Create a one time token

Generates a low strength random number of size $bytes and hash with the algorithm specified in $hash.

Parameters
string$hashhash function to use
integer$bytesthe number of random bit to generate
Returns
string hashed token

Definition at line 41 of file Random.php.

Referenced by Xoops\Core\Security\createToken(), and Xoops\Core\Session\RememberMe\getNewToken().

Here is the caller graph for this function:


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