RP_CREATE(3)

FUNCTION
rp_create - Create a pool of random bytes.

SYNOPSIS
#include <karma_rp.h>

RandPool rp_create

( unsigned int size, unsigned int hash_digest_size, unsigned int hash_block_size, void (*hash_func) () )

DESCRIPTION
This routine will create a random pool of bytes to which random data may be subsequently added or extracted. The pool is initialised with pseudo-random data (which is *not* cryptographically secure). When data is added to the pool, the pool is stirred using a supplied hash function. Bytes extracted from the pool should be cryptographically secure.

size
    The size of the pool.

hash_digest_size
    The size of the hash buffer.

hash_block_size
    The size of the hash block.

hash_func
    The hash function. The prototype function is <-rp_PROTO_hash_func->.

RETURN VALUE
A RandPool object on success, else NULL.

Multi-threading Level
Unsafe.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/