mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-12 16:36:30 +00:00
Merge branch '2.0-travis-exp' into master-travis-exp
This commit is contained in:
commit
f0b1439639
@ -46,6 +46,10 @@ abstract class Random
|
|||||||
*/
|
*/
|
||||||
public static function string($length)
|
public static function string($length)
|
||||||
{
|
{
|
||||||
|
if (!$length) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return \random_bytes($length);
|
return \random_bytes($length);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user