1 // copied from NaCl (the crypto lib)
8 /* it's really stupid that there isn't a syscall for this */
12 void randombytes(void *x_,unsigned long long xlen)
14 unsigned char *x = x_;
19 fd = open("/dev/urandom",O_RDONLY);
26 if (xlen < 1048576) i = xlen; else i = 1048576;