[Top] [Prev] [Next] [Bottom]


[Contents] [Index]

randomint, randombuf - interface to random number device

include "security.m";
Random : module {
	PATH:	con "/dis/lib/random.dis";

	ReallyRandom:   con 0;
	NotQuiteRandom: con 1;

	randomint:	fn(which: int): int;
	randombuf:	fn(which, n: int); array of byte;
}

Description

The Random module provides a convenient interface to random number device, part of the console driver. The parameter which determines whether the file /dev/random or /dev/notquiterandom is read to get the random numbers.
randomint(which) Return a random integer value.
randombuf(which, n) Return an array of bytes with n random bytes.

See Also

random (read-only) of cons - console device in Chapter 2

The /dev/random and /dev/notquiterandom files are implemented as part of the console device.



[Top] [Prev] [Next] [Bottom]

infernosupport@lucent.com
Copyright © 1997, Lucent Technologies, Inc.. All rights reserved.