mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-28 12:10:59 +00:00
Merge branch '1.0-travis-exp' into 2.0-travis-exp
This commit is contained in:
commit
2f3c9197d9
@ -45,6 +45,10 @@ class Random
|
||||
*/
|
||||
static function string($length)
|
||||
{
|
||||
if (!$length) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (version_compare(PHP_VERSION, '7.0.0', '>=')) {
|
||||
try {
|
||||
return \random_bytes($length);
|
||||
|
Loading…
Reference in New Issue
Block a user