mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-15 19:16:55 +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