Documentation

HashRNGProvider
in package
implements IRNGProvider

Interfaces, Classes, Traits and Enums

IRNGProvider

Table of Contents

$algorithm  : string
__construct()  : mixed
getRandomBytes()  : string
isCryptographicallySecure()  : bool

Properties

Methods

__construct()

public __construct([string $algorithm = 'sha256' ]) : mixed
Parameters
$algorithm : string = 'sha256'
Return values
mixed

getRandomBytes()

public getRandomBytes(mixed $bytecount) : string
Parameters
$bytecount : mixed

the number of bytes of randomness to return

Return values
string

the random bytes

isCryptographicallySecure()

public isCryptographicallySecure() : bool
Return values
bool

whether this provider is cryptographically secure

Search results