1 | <?php |
||
34 | abstract class AbstractSource implements \RandomLib\Source |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * Return an instance of Strength indicating the strength of the source |
||
39 | * |
||
40 | * @return \SecurityLib\Strength An instance of one of the strength classes |
||
41 | */ |
||
42 | public static function getStrength() |
||
46 | |||
47 | /** |
||
48 | * If the source is currently available. |
||
49 | * Reasons might be because the library is not installed |
||
50 | * |
||
51 | * @return bool |
||
52 | */ |
||
53 | public static function isSupported() |
||
57 | |||
58 | /** |
||
59 | * Returns a string of zeroes, useful when no entropy is available. |
||
60 | * |
||
61 | * @param int $size The size of the requested random string |
||
62 | * |
||
63 | * @return string A string of the requested size |
||
64 | */ |
||
65 | protected static function emptyValue($size) |
||
69 | } |
||
70 |