lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Jan 19, 2012 at 7:11 PM, William Ahern
<william@25thandclement.com> wrote:

> rand() is anything but random. Likewise for random(). They're extremely
> predictable. You're going to have to go platform specific. For OpenBSD or OS
> X, for example, use arc4random(). For Linux use sysctl() and mib[] = {
> CTL_KERN, KERN_RANDOM, RANDOM_UUID }.

Please don't assume Linux == glibc. Alpine Linux has arc4random() too.

-- 
Natanael Copa