8000 Performance tweak · laravel/framework@14d5281 · GitHub
[go: up one dir, main page]

Skip to content

Commit 14d5281

Browse files
author
Graham Campbell
committed
Performance tweak
1 parent d18f433 commit 14d5281

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Support/Str.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public static function random($length = 16)
218218
while (($len = strlen($string)) < $length)
219219
{
220220
$size = $length - $len;
221-
$bytes = static::randomBytes($size * 2);
221+
$bytes = static::randomBytes($size);
222222
$string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size);
223223
}
224224

0 commit comments

Comments
 (0)
0