mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-29 01:13:57 +00:00
large commit
This commit is contained in:
@@ -9,8 +9,9 @@ final class common
|
||||
/**
|
||||
* @param int $length
|
||||
* @return string
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function generateRandomHash(int $length = 10): string {
|
||||
return substr(bin2hex(ceil($length / 2)), 0, $length);
|
||||
return substr(bin2hex(random_bytes(ceil($length / 2))), 0, $length);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user