mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Merge pull request #661 from samsonasik/more-entropy-true-md5
set more_entropy = true on uniquid at md5 random_string helper
This commit is contained in:
commit
f3ba8a5f41
@ -742,7 +742,7 @@ if ( ! function_exists('random_string'))
|
|||||||
|
|
||||||
return substr(str_shuffle(str_repeat($pool, ceil($len / strlen($pool)))), 0, $len);
|
return substr(str_shuffle(str_repeat($pool, ceil($len / strlen($pool)))), 0, $len);
|
||||||
case 'md5':
|
case 'md5':
|
||||||
return md5(uniqid(mt_rand()));
|
return md5(uniqid(mt_rand(), true));
|
||||||
case 'sha1':
|
case 'sha1':
|
||||||
return sha1(uniqid(mt_rand(), true));
|
return sha1(uniqid(mt_rand(), true));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user