On Sun, May 3, 2020 at 2:57 PM Rowan Tommins <rowan.coll...@gmail.com> wrote:
>
> A common suggestion is to use binhex(random_bytes($desired_length / 2)),
> which isn't particularly elegant, and in my experience, the main
> requirement is "a unique string of printable/alphanumeric characters, so
> limiting to [0-9a-f] is just limiting entropy for no reason.
>

Yes, a base_convert(..., 16, 32) around that would help but I'd really
prefer a simple function than a chain of 3 functions (even if we had
Larry's pipe operator :-p)

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to