Make-Random
(make-random algorithm) -> random
- algorithm -- A string--see below.
Creates a new <random> object using the specified algorithm, capable of producing extended sequences of random bytes.
Algorithms Supported:
- "fortuna" -- a composite pseudorandom number generator, Fortuna is well regarded, and quite complex. For most tasks, MOSVM's Fortuna implementation is strong enough for the job.
- "sprng" -- sprng is not a pseudorandom number generator; instead it relies on entropy data supplied by the host environment, either via /dev/urandom, the Microsoft CSP, or an extremely slow clock drift implementation. A good source for occasionally adding entropy to other, faster generators.
- "yarrow" -- Yarrow is the predecessor of Fortuna. Currently considered weaker than Fortuna, but due to its simpler algorithm its properties are better understood.
- "rc4" -- a stream cipher often used as a pseudorandom number generator, RC4 is simple and fast, but not sophisticated enough to be considered for new applications.
Example:
>> (make-random "sprng")
:: [random]
See also:
*default-random*, <random>, add-entropy, export-random, import-random, make-random, random-algorithm, random-integer, random-quad, and random-string