urandom.c
changeset 29 7abf6146898e
parent 27 81a574d60c15
child 77 49e0babccb23
equal deleted inserted replaced
28:54addf5893ef 29:7abf6146898e
    16 }
    16 }
    17 
    17 
    18 int main (int argc, char **argv)
    18 int main (int argc, char **argv)
    19 {
    19 {
    20     int i;
    20     int i;
       
    21     int elements;
       
    22     int fd;
    21 
    23 
    22     int elements;
       
    23 
       
    24     int fd;
       
    25     unsigned char numbers[256] = { 0 };
    24     unsigned char numbers[256] = { 0 };
    26 
    25 
    27     fd = open ("/dev/urandom", O_RDONLY);
    26     fd = open ("/dev/urandom", O_RDONLY);
    28     if (fd == -1)
    27     if (fd == -1)
    29         return EXIT_FAILURE;
    28         return EXIT_FAILURE;