Update Core\Secury
This commit is contained in:
parent
1f70e8aaa4
commit
f7f180c9d3
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ class Secury
|
|||
*/
|
||||
public function randomHash(int $len): string
|
||||
{
|
||||
return \substr(\bin2hex(\random_bytes($len)), 0, $len);
|
||||
return \substr(\bin2hex(\random_bytes(\intdiv($len, 2) + 1)), 0, $len);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue