1 (* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 * Copyright (C) 1997-2000 NEC Research Institute.
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
9 signature MLTON_RANDOM =
11 (* Return a random alphanumeric character. *)
12 val alphaNumChar: unit -> char
14 (* Return a string of random alphanumeric characters of specified
17 val alphaNumString: int -> string
19 (* Get the next pseudrandom. *)
20 val rand: unit -> word
22 (* Use /dev/random to get a word. Useful as an arg to srand.
23 * Return NONE if /dev/random can't be read.
25 val seed: unit -> word option
27 (* Set the seed used by rand. *)
28 val srand: word -> unit
30 (* Use /dev/urandom to get a word. Useful as an arg to srand.
31 * Return NONE if /dev/urandom can't be read.
33 val useed: unit -> word option