1 | <?php |
||
33 | class URandom extends \RandomLib\AbstractSource { |
||
34 | |||
35 | /** |
||
36 | * @var string The file to read from |
||
37 | */ |
||
38 | protected static $file = '/dev/urandom'; |
||
39 | |||
40 | /** |
||
41 | * Return an instance of Strength indicating the strength of the source |
||
42 | * |
||
43 | * @return \SecurityLib\Strength An instance of one of the strength classes |
||
44 | */ |
||
45 | public static function getStrength() { |
||
48 | |||
49 | /** |
||
50 | * If the source is currently available. |
||
51 | * Reasons might be because the library is not installed |
||
52 | * |
||
53 | * @return boolean |
||
54 | */ |
||
55 | public static function isSupported() |
||
59 | |||
60 | /** |
||
61 | * Generate a random string of the specified size |
||
62 | * |
||
63 | * @param int $size The size of the requested random string |
||
64 | * |
||
65 | * @return string A string of the requested size |
||
66 | */ |
||
67 | public function generate($size) { |
||
82 | |||
83 | } |
||
84 |