2 * Sherlock Library -- Cryptographically Safe Random Key Generator
4 * (c) 2002 Martin Mares <mj@ucw.cz>
13 randomkey(byte *buf, uns size)
17 if ((fd = open("/dev/urandom", O_RDONLY, 0)) < 0)
18 die("Unable to open /dev/urandom: %m");
19 if (read(fd, buf, size) != (int) size)
20 die("Error reading /dev/urandom: %m");