Randval

Implements RandValInterface

Generates cryptographically-secure random values.

since

4.0.0

package

Application

Methods

generate

Returns a cryptographically secure random value.

generate(int bytes = 32) : string

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