Vitanuova for 2002 December 11 (entry 10)

< Sugar
EFF party >

Write a portable ANSI C program which can be run multiple times as an unprivileged user and gives different output each time with the same input. For example:

somehost:~$ cc -o random random.c
somehost:~$ ./random
0
somehost:~$ ./random
1
somehost:~$ ./random
1
somehost:~$ ./random
0

Well, you say, that's easy, I'll just read /dev/urandom, or I'll be retro and call random(3) and seed it with the current time, the way we did in the old days. But no, you have to follow these conditions:

I found two ways of doing it subject to these constraints. I should make the constraints tougher, and see if it could still be done, but that would be a spoiler for how to do it.


Links from other weblogs:

Tue Aug 19 00:59:10: casino spiele mit echtem geld from juego al instante paginas web

Play poker texas online game poker on line gratis http://groups.google.it/group/re...


[Main]
Support Bloggers' Rights!
Support Bloggers' Rights!


Contact: Seth David Schoen