Manual Pages for UNIX Darwin command on man sranddev
MyWebUniversity

Manual Pages for UNIX Darwin command on man sranddev

RAND(3) BSD Library Functions Manual RAND(3)

NAME

rraanndd, ssrraanndd, ssrraannddddeevv, rraannddrr - bad random number generator

LLIIBBRRAARRYY

Standard C Library (libc, -lc)

SYNOPSIS

##iinncclluuddee <>

void ssrraanndd(unsigned seed); void ssrraannddddeevv(void); int rraanndd(void); int rraannddrr(unsigned *ctx);

DESCRIPTION

These interfaces are obsoleted by adm3).

The rraanndd() function computes a sequence of pseudo-random integers in the

range of 0 to RANDMAX (as defined by the header file ). The ssrraanndd() function sets its argument seed as the seed for a new

sequence of pseudo-random numbers to be returned by rraanndd(). These

sequences are repeatable by calling ssrraanndd() with the same seed value. If no seed value is provided, the functions are automatically seeded with a value of 1. The ssrraannddddeevv() function initializes a seed using the random(4) random

number device which returns good random numbers, suitable for crypto-

graphic use. The rraannddrr() function provides the same functionality as rraanndd(). A pointer to the context value ctx must be supplied by the caller.

SEE ALSO

random(3), random(4) STANDARDS The rraanndd() and ssrraanndd() functions conform to ISO/IEC 9899:1990 (``ISO C90'').

The rraannddrr() function is as proposed in the POSIX.4a Draft #6 document.

BSD May 25, 1999 BSD




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™