source: project/wiki/eggref/5/isaac @ 36801

Last change on this file since 36801 was 36801, checked in by evhan, 11 months ago

wiki/eggref: update docs/formatting/urls and eggref/5/{r7rs,fancypants,chicken-belt}

File size: 1.1 KB
Line 
1[[tags: egg]]
2
3== isaac
4
5[[toc:]]
6
7== Description
8
9Bindings to Bob Jenkins' [[https://burtleburtle.net/bob/rand/isaacafa.html|ISAAC CSPRNG]].
10
11The source for this extension is available [[https://git.foldling.org/chicken-isaac.git|here]].
12
13== Requirements
14
15* [[module-declarations]]
16
17== API
18
19A single function is provided, which creates a new random procedure:
20
21<procedure>(make-isaac #!optional (seed (make-blob SEED)))</procedure>
22
23Creates a new ISAAC instance.
24
25The result is a procedure of no arguments that returns a random fixnum value on each invocation.
26
27{{seed}} is used to initialize the procedure's stream of random values. If given, it should be a blob of size 2048. If not given, a block of uninitialized memory will be used.
28
29If cryptographic security is desired, {{seed}} should itself be the result of some secure random source. On Linux and BSD, 2048 bytes from "/dev/urandom" or "/dev/arandom" will suffice.
30
31== Examples
32
33<enscript highlight=scheme>
34#;> (import isaac)
35#;> (define isaac (make-isaac))
36#;> (isaac)
371659971739
38#;> (isaac)
394077212320
40#;> (isaac)
411011352789
42</enscript>
43
44== Author
45
46[[/users/evan-hanson|Evan Hanson]]
47
48== License
49
50Public Domain
Note: See TracBrowser for help on using the repository browser.