feat(Random): add hex characters set
This commit is contained in:
parent
9eb428c528
commit
df790e0c9a
3 changed files with 7 additions and 2 deletions
|
|
@ -5,7 +5,8 @@ function generateRandomString($length = 10, $contains = ['upper', 'lower', 'digi
|
|||
'digit' => '0123456789',
|
||||
'lower' => 'abcdefghijklmnopqrstuvwxyz',
|
||||
'upper' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
||||
'special' => '!#$%&()*+,-.:;<=>?@[]'
|
||||
'special' => '!#$%&()*+,-.:;<=>?@[]',
|
||||
'hex' => '0123456789abcdef'
|
||||
];
|
||||
$characters = '';
|
||||
foreach ($contains as $c) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue