Welcome Guest, Not a member yet? Register   Sign In
Does this small piece of code seem ok?
#6

Code:
$guest_code = bin2hex(pack('N', microtime(TRUE))).bin2hex(get_instance()->security->get_random_bytes(4));

Almost guaranteed uniqueness and better randomness.
Reply


Messages In This Thread
Does this small piece of code seem ok? - by PaulD - 10-30-2015, 09:02 AM
RE: Does this small piece of code seem ok? - by Narf - 10-30-2015, 10:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB