I want to use /dev/random or /dev/urandom in C. How can I do it? I don\'t know how can I handle them in C, if someone knows please tell me how. Tha
/dev/random
/dev/urandom
There are other accurate answers above. I needed to use a FILE* stream, though. Here's what I did...
FILE*
int byte_count = 64; char data[64]; FILE *fp; fp = fopen("/dev/urandom", "r"); fread(&data, 1, byte_count, fp); fclose(fp);