randomnumber(3)

NAME
randomnumber() - an arc4 random nuber generator

SYNOPSIS
#include "fwfunc.h"

int randomnumber()

DESCRIPTION
The randomnumber function uses the key stream generator employed by the arc4 cipher, which uses 8*8 8 bit S-Boxes. The S-Boxes can be in about (2**1700) states. When called first time, the function initializes itself using system-dependant noise driver (/dev/random, /dev/urandom or other as specified when compiled).

RETURN VALUES
The randomnumber function returns long (converted from u_int32_t) random number

SEE ALSO
arc4random(3),random(9),random(4)

BUGS
The function depends on quality of your hardware entropy collector.

If your 'long' is longer than 4 bytes, only u_int_32t range will be used for return values.

HISTORY
A weak PRNG (using time and pid for initial state) is used to be here since fwtk 2.