fatbase

portable OpenBSD tools
git clone git://git.2f30.org/fatbase
Log | Files | Refs

arc4random.c (186B)


      1 #include <sys/types.h>
      2 #include <stdint.h>
      3 #include <stdlib.h>
      4 #include <time.h>
      5 #include <unistd.h>
      6 
      7 uint32_t
      8 arc4random(void)
      9 {
     10 	srand(time(NULL) ^ getpid() ^ 0x42);
     11 	return rand();
     12 }