3 * The Random Random Number Source
5 * This uses the *nix /dev/random device to generate high strength numbers
9 * @category PHPCryptLib
12 * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
13 * @copyright 2011 The Authors
14 * @license http://www.opensource.org/licenses/mit-license.html MIT License
15 * @version Build @@version@@
18 namespace CryptLib\Random\Source
;
20 use CryptLib\Core\Strength
;
23 * The Random Random Number Source
25 * This uses the *nix /dev/random device to generate high strength numbers
27 * @category PHPCryptLib
30 * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
33 class Random
extends URandom
{
36 * @var string The file to read from
38 protected $file = '/dev/random';
41 * Return an instance of Strength indicating the strength of the source
43 * @return Strength An instance of one of the strength classes
45 public static function getStrength() {
46 return new Strength(Strength
::HIGH
);