Main Page Modules Data Structures File List Data Fields Globals Related Pages

# Entropy sources

## Files

file | entropy.c
| Entropy gathering routine(s) for pseudo-random generator initialization.

## Data Structures

struct | entropySource

## Entropy sources

typedef int(* | entropyNext )(uint32 *data, int size)
int | entropySourceCount (void)
const entropySource * | entropySourceGet (int index)
const entropySource * | entropySourceFind (const char *name)
const entropySource * | entropySourceDefault (void)
int | entropyGatherNext (uint32 *data, int size)

## Typedef Documentation

typedef int(* entropyNext)( uint32* data, int size)

Return an array of 32-bit unsigned integers of given size with entropy data.

Return values:

  data | entropy data

Parameters:

  size | no. of ints of data

Returns:
  0 on success, -1 on failure

Definition at line 45 of file beecrypt.h.

## Function Documentation

int entropyGatherNext | ( | uint32 * | data,
|  | int | size
| ) |

Gather entropy from multiple sources (if BEECRYPT_ENTROPY is not set).

Return values:

  data | entropy data

Parameters:

  size | no. of ints of data

Returns:
  0 on success, -1 on failure

Definition at line 129 of file beecrypt.c.

Referenced by fips186Setup, and mtprngSetup.

int entropySourceCount | ( | void |  | ) |

Return the number of entropy sources available.

Returns:
  number of entropy sources available

Definition at line 89 of file beecrypt.c.

References BEECRYPTAPI, and uint32.

const entropySource* entropySourceDefault | ( | void |  | ) |

Retrieve the default entropy source. If the BEECRYPT_ENTROPY environment variable is set, use that entropy source. Otherwise, use the 1st entry in the internal table.

Returns:
  entropy source pointer (or NULL)

Definition at line 116 of file beecrypt.c.

const entropySource* entropySourceFind | ( | const char * | name | ) |

Retrieve a entropy source by name.

Parameters:

  name | entropy source name

Returns:
  entropy source pointer (or NULL)

Definition at line 103 of file beecrypt.c.

Referenced by entropyGatherNext, and entropySourceDefault.

const entropySource* entropySourceGet | ( | int | index | ) |

Retrieve a entropy source by index.

Parameters:

  index | entropy source index

Returns:
  entropy source pointer (or NULL)

Definition at line 94 of file beecrypt.c.