for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* The RandomLib library for securely generating random numbers and strings in PHP
*
* @author Anthony Ferrara <[email protected]>
* @copyright 2011 The Authors
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version Build @@version@@
*/
/**
* The Random Random Number Source
* This uses the *nix /dev/random device to generate high strength numbers
* PHP version 5.3
* @category PHPCryptLib
* @package Random
* @subpackage Source
namespace RandomLib\Source;
use SecurityLib\Strength;
* @codeCoverageIgnore
class Random extends URandom
{
* @var string The file to read from
protected static $file = '/dev/random';
* Return an instance of Strength indicating the strength of the source
* @return \SecurityLib\Strength An instance of one of the strength classes
public static function getStrength()
return new Strength(Strength::HIGH);
}