Randval

Implements RandValInterface

Generates cryptographically-secure random values.

since

4.0.0

package

Joomla CMS

Methods

generate

Returns a cryptographically secure random value.

generate( bytes = 32) : 

This method allows us to quickly address any future issues if we ever find problems with PHP's random_bytes() on some weird host (you can't be too careful when releasing mass-distributed software).

Arguments

bytes

intHow many bytes to return

Response

string