Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (2) — Plan9 3rd Edition (Vita Nuova)

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rand(2)

cons(3)

SECURITY-RANDOM(2)

NAME

random: randomint, randombuf − random number generation

SYNOPSIS

include "security.m";
random := load Random Random->PATH;
 randomint:  fn(which: int): int;
randombuf:  fn(which, n: int): array of byte;

DESCRIPTION

­Randomint and ­randombuf return random or not-quite-random data obtained from ­/dev/random or /dev/notquiterandom.  ­Randomint returns a random integer; ­randombuf returns an array of length ­n filled with random bytes.  In both functions, ­which may be either ­ReallyRandom or ­NotQuiteRandom to select the random data source. 

FILES

­/dev/random
­/dev/notquiterandom

SOURCE

­/appl/lib/random.b

SEE ALSO

rand(2), cons(3)

Plan 9  —  June 29, 2000

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026