#include "randombytes.h" #include #include #include #include /* lazy unsafe emulation of SUPERCOP's randombytes() */ void randombytes (unsigned char *x, unsigned long long xlen) { static int fd = -1; if (fd == -1) fd = open ("/dev/urandom", O_RDONLY); read (fd, x, xlen); }