Common Lisp Package: SECURE-RANDOM

README:

FUNCTION

Public

NUMBER (LIMIT &OPTIONAL (GENERATOR *GENERATOR*))

Returns a cryptographically strong pseudo-random number that is a non-negative number less than LIMIT and of the same type as LIMIT (in the current implementation, only INTEGER type is supporeted). LIMIT is a positive number. GENERATOR is an instance of a subclass of the SECURE-RANDOM:GENERATOR. Signals an ERROR in case of problems (for example when the random number generator has not been initialized with enough entrophy).

Private

Undocumented

OCTETS-TO-INTEGER (OCTETS-VEC)

GENERIC-FUNCTION

Public

BYTES (COUNT GENERATOR)

The only generic function which needs to be implemented by a subclass of SECURE-RANDOM:GENERATOR. Generates COUNT cryptographically strong pseudo-random bytes using the random number generator GENERATOR. Returns the bytes as a SIMPLE-ARRAY with ELEMENT-TYPE '(UNSIGNED-BYTE 8). Signals an ERROR in case of problems (for example when the random number generator has not been initialized with enough entrophy).

VARIABLE

Public

Undocumented

*GENERATOR*

CLASS

Public

GENERATOR

The base class for all the possible implementations of secure random number generator.

Private

Undocumented

OPEN-SSL-GENERATOR