The cl-diceware Reference Manual

This is the cl-diceware Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:50:10 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-diceware

Diceware in Lisp

Author

Bill St. Clair <>

License

MIT

Version

1.0

Source

cl-diceware.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-diceware/cl-diceware.asd

Source

cl-diceware.asd.

Parent Component

cl-diceware (system).

ASDF Systems

cl-diceware.


3.1.2 cl-diceware/package.lisp

Source

cl-diceware.asd.

Parent Component

cl-diceware (system).

Packages

cl-diceware.


3.1.3 cl-diceware/random.lisp

Dependency

package.lisp (file).

Source

cl-diceware.asd.

Parent Component

cl-diceware (system).

Public Interface
Internals

3.1.4 cl-diceware/diceware-word-list.lisp

Dependency

random.lisp (file).

Source

cl-diceware.asd.

Parent Component

cl-diceware (system).

Internals

*diceware-words* (special variable).


3.1.5 cl-diceware/diceware.lisp

Dependency

diceware-word-list.lisp (file).

Source

cl-diceware.asd.

Parent Component

cl-diceware (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-diceware

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: with-/dev/random ((&optional stream) &body body)

Evaluate BODY with STREAM bound to a binary input stream to /dev/random.

Package

cl-diceware.

Source

random.lisp.


5.1.2 Ordinary functions

Function: random-byte ()

Return one random byte.

Package

cl-diceware.

Source

random.lisp.

Function: random-integer (limit)

Return a random integer >= 0 and < limit. Same as ‘cl:random’, but better randomness.

Package

cl-diceware.

Source

random.lisp.

Function: random-word ()

Return a random Diceware word.

Package

cl-diceware.

Source

diceware.lisp.

Function: random-words (count)

Return a list of COUNT random Diceware words.

Package

cl-diceware.

Source

diceware.lisp.

Function: random-words-string (&optional count)

Return a string containing COUNT random Diceware words, separated by spaces. COUNT default to 5.

Package

cl-diceware.

Source

diceware.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: */dev/random-stream*
Package

cl-diceware.

Source

random.lisp.

Special Variable: *diceware-hash*
Package

cl-diceware.

Source

diceware.lisp.

Special Variable: *diceware-words*
Package

cl-diceware.

Source

diceware-word-list.lisp.

Special Variable: *real-random-p*

Control whether we use /dev/random or /dev/urandom. See documentation for ‘real-random-p’.

Package

cl-diceware.

Source

random.lisp.

Special Variable: *remainder*
Package

cl-diceware.

Source

random.lisp.

Special Variable: *remainder-bits*
Package

cl-diceware.

Source

random.lisp.


5.2.2 Macros

Macro: with-shift-in (&body body)
Package

cl-diceware.

Source

random.lisp.


5.2.3 Ordinary functions

Function: %random-bits (count s)
Package

cl-diceware.

Source

random.lisp.

Function: %random-byte (s)
Package

cl-diceware.

Source

random.lisp.

Function: %shift-in (accum fix-accum fix-accum-bits fix-accum-size value bits)
Package

cl-diceware.

Source

random.lisp.

Function: %shift-value (accum fix-accum fix-accum-bits)
Package

cl-diceware.

Source

random.lisp.

Function: /dev/random-path ()
Package

cl-diceware.

Source

random.lisp.

Function: call-with-/dev/random (thunk)

Helper function for ‘with-dev/random’.

Package

cl-diceware.

Source

random.lisp.

Function: diceware-gethash (key)

Get the Diceware word for KEY, which should be a five-digit (base 10) integer, with digits from 1 to 6.

Package

cl-diceware.

Source

diceware.lisp.

Function: init-diceware-hash ()

Initialize and return ‘*diceware-hash*’.

Package

cl-diceware.

Source

diceware.lisp.

Function: maybe-init-diceware-hash ()

Initialize ‘*diceware-hash*’, if its null, and return it.

Package

cl-diceware.

Source

diceware.lisp.

Function: random-bits (count)

Return an integer containing COUNT random bits.

Package

cl-diceware.

Source

random.lisp.

Function: random-diceware-key ()

Compute a random Diceware key, a five-digit (base 10) integer with digits from 1 to 6.

Package

cl-diceware.

Source

diceware.lisp.

Function: real-random-p ()

True if ‘*real-random-p*’ is true or ‘*real-random-p*’ is :USE-FEATURES and :CL-DICEWARE-REAL-RANDOM is on ‘*features*’, which it will be if
you load cl-diceware.asd with a non-null value for the CL_DICEWARE_REAL_RANDOM environment variable.

Package

cl-diceware.

Source

random.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   /  
C   D   F   I   M   R   W  
Index Entry  Section

%
%random-bits: Private ordinary functions
%random-byte: Private ordinary functions
%shift-in: Private ordinary functions
%shift-value: Private ordinary functions

/
/dev/random-path: Private ordinary functions

C
call-with-/dev/random: Private ordinary functions

D
diceware-gethash: Private ordinary functions

F
Function, %random-bits: Private ordinary functions
Function, %random-byte: Private ordinary functions
Function, %shift-in: Private ordinary functions
Function, %shift-value: Private ordinary functions
Function, /dev/random-path: Private ordinary functions
Function, call-with-/dev/random: Private ordinary functions
Function, diceware-gethash: Private ordinary functions
Function, init-diceware-hash: Private ordinary functions
Function, maybe-init-diceware-hash: Private ordinary functions
Function, random-bits: Private ordinary functions
Function, random-byte: Public ordinary functions
Function, random-diceware-key: Private ordinary functions
Function, random-integer: Public ordinary functions
Function, random-word: Public ordinary functions
Function, random-words: Public ordinary functions
Function, random-words-string: Public ordinary functions
Function, real-random-p: Private ordinary functions

I
init-diceware-hash: Private ordinary functions

M
Macro, with-/dev/random: Public macros
Macro, with-shift-in: Private macros
maybe-init-diceware-hash: Private ordinary functions

R
random-bits: Private ordinary functions
random-byte: Public ordinary functions
random-diceware-key: Private ordinary functions
random-integer: Public ordinary functions
random-word: Public ordinary functions
random-words: Public ordinary functions
random-words-string: Public ordinary functions
real-random-p: Private ordinary functions

W
with-/dev/random: Public macros
with-shift-in: Private macros