summaryrefslogtreecommitdiff
path: root/man/2/security-random
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
commit46439007cf417cbd9ac8049bb4122c890097a0fa (patch)
tree6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /man/2/security-random
parent37da2899f40661e3e9631e497da8dc59b971cbd0 (diff)
20060303-partial
Diffstat (limited to 'man/2/security-random')
-rw-r--r--man/2/security-random43
1 files changed, 43 insertions, 0 deletions
diff --git a/man/2/security-random b/man/2/security-random
new file mode 100644
index 00000000..60ff3f7c
--- /dev/null
+++ b/man/2/security-random
@@ -0,0 +1,43 @@
+.TH SECURITY-RANDOM 2
+.SH NAME
+random: randomint, randombuf \-
+random number generation
+.SH SYNOPSIS
+.EX
+include "security.m";
+random := load Random Random->PATH;
+
+randomint: fn(which: int): int;
+randombuf: fn(which, n: int): array of byte;
+.EE
+.SH DESCRIPTION
+.B Randomint
+and
+.B randombuf
+return random or not-quite-random data
+obtained from
+.B /dev/random
+or
+.BR /dev/notquiterandom .
+.B Randomint
+returns a random integer;
+.B randombuf
+returns an array of length
+.I n
+filled with random bytes.
+In both functions,
+.I which
+may be either
+.B ReallyRandom
+or
+.B NotQuiteRandom
+to select the random data source.
+.SH FILES
+.B /dev/random
+.br
+.B /dev/notquiterandom
+.SH SOURCE
+.B /appl/lib/random.b
+.SH SEE ALSO
+.IR rand (2),
+.IR cons (3)