3 * The Random Number Source interface.
5 * All random number sources must implement this interface
9 * @category PHPCryptLib
11 * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
12 * @copyright 2011 The Authors
13 * @license http://www.opensource.org/licenses/mit-license.html MIT License
14 * @version Build @@version@@
17 namespace CryptLib\Random
;
20 * The Random Number Source interface.
22 * All random number sources must implement this interface
24 * @category PHPCryptLib
26 * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
32 * Return an instance of Strength indicating the strength of the source
34 * @return Strength An instance of one of the strength classes
36 public static function getStrength();
39 * Generate a random string of the specified size
41 * Note: If the source fails to generate enough data, the result must be
42 * padded to the requested length.
44 * @param int $size The size of the requested random string
46 * @return string A string of the requested size
48 public function generate($size);