source: project/wiki/eggref/4/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
26fixnum value on each invocation.
27
28{{seed}} is used to initialize the procedure's stream of random values.
29If given, it should be a blob of size 2048. If not given, a block of
30uninitialized memory will be used.
31
32If cryptographic security is desired, {{seed}} should itself be the
33result of some secure random source. On Linux and BSD, 2048 bytes
34from "/dev/urandom" or "/dev/arandom" will suffice.
35
36== Examples
37
38<enscript highlight=scheme>
39#;> (use isaac)
40#;> (define isaac (make-isaac))
41#;> (isaac)
421659971739
43#;> (isaac)
444077212320
45#;> (isaac)
461011352789
47</enscript>
48
49== Author
50
51[[/users/evan-hanson|Evan Hanson]]
52
53== License
54
55Public Domain
Note: See TracBrowser for help on using the repository browser.