MCryptRNGProvider
in package
implements
IRNGProvider
Interfaces, Classes, Traits and Enums
Table of Contents
- $source : int
- __construct() : mixed
- getRandomBytes() : string
- isCryptographicallySecure() : bool
Properties
$source
private
int
$source
Methods
__construct()
public
__construct([int $source = MCRYPT_DEV_URANDOM ]) : mixed
Parameters
- $source : int = MCRYPT_DEV_URANDOM
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